mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-22 15:31:14 +00:00
* Source/cairo/CairoFontEnumerator.m:
* Source/cairo/CairoFaceInfo (-characterSet): Remove the call to FcFontMatch in -characterSet which was a big performace bottleneck. Instead load the character set data when enumerating all fonts in CairoFontEnumerator. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@32986 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
575901b00d
commit
016af1f41c
3 changed files with 13 additions and 11 deletions
|
@ -1,3 +1,12 @@
|
|||
2011-05-05 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Source/cairo/CairoFontEnumerator.m:
|
||||
* Source/cairo/CairoFaceInfo (-characterSet): Remove the call to
|
||||
FcFontMatch in -characterSet which was a big performace
|
||||
bottleneck.
|
||||
Instead load the character set data when enumerating all fonts in
|
||||
CairoFontEnumerator.
|
||||
|
||||
2011-04-17 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Source/cairo/CairoFontEnumerator.m: Remove declarations after
|
||||
|
|
|
@ -125,21 +125,14 @@
|
|||
|
||||
- (NSCharacterSet*)characterSet
|
||||
{
|
||||
FcResult result;
|
||||
FcPattern *resolved;
|
||||
FcCharSet *charset;
|
||||
FcCharSet *fcCharset;
|
||||
NSCharacterSet *characterSet = nil;
|
||||
|
||||
FcConfigSubstitute(NULL, _pattern, FcMatchPattern);
|
||||
FcDefaultSubstitute(_pattern);
|
||||
resolved = FcFontMatch(NULL, _pattern, &result);
|
||||
|
||||
if (FcResultMatch == FcPatternGetCharSet(resolved, FC_CHARSET, 0, &charset))
|
||||
if (FcResultMatch == FcPatternGetCharSet(_pattern, FC_CHARSET, 0, &fcCharset))
|
||||
{
|
||||
characterSet = [[[FontconfigCharacterSet alloc] initWithFontconfigCharSet: charset] autorelease];
|
||||
characterSet = [[[FontconfigCharacterSet alloc] initWithFontconfigCharSet: fcCharset] autorelease];
|
||||
}
|
||||
|
||||
FcPatternDestroy(resolved);
|
||||
return characterSet;
|
||||
}
|
||||
|
||||
|
|
|
@ -152,7 +152,7 @@ static NSArray *faFromFc(FcPattern *pat)
|
|||
|
||||
FcPattern *pat = FcPatternCreate();
|
||||
FcObjectSet *os = FcObjectSetBuild(FC_FAMILY, FC_SLANT, FC_WEIGHT,
|
||||
FC_SPACING, NULL);
|
||||
FC_SPACING, FC_CHARSET, NULL);
|
||||
FcFontSet *fs = FcFontList(NULL, pat, os);
|
||||
|
||||
FcPatternDestroy(pat);
|
||||
|
|
Loading…
Reference in a new issue