mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-22 15:31:14 +00:00
In [setupAttributes] moved the call to open the XFT font further
to the back as Derek Zhou claims that this takes over the ownership of the pattern, which then results in strange behaviour. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@16090 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a8690d6112
commit
dfe9d838b4
1 changed files with 11 additions and 10 deletions
|
@ -592,16 +592,6 @@ static NSArray *faFromFc(FcPattern *pat)
|
|||
// tide up
|
||||
FcPatternDestroy(fontPattern);
|
||||
|
||||
if ((font_info = XftFontOpenPattern(xdpy, pattern)))
|
||||
{
|
||||
NSDebugLog(@"Loaded font: %@", fontName);
|
||||
}
|
||||
else
|
||||
{
|
||||
NSDebugLog(@"Cannot load font: %@", fontName);
|
||||
return NO;
|
||||
}
|
||||
|
||||
if (FcPatternGetString(pattern, FC_FAMILY, 0, (FcChar8 **)&family) == FcResultMatch)
|
||||
{
|
||||
ASSIGN(familyName, [NSString stringWithCString: (const char*)family]);
|
||||
|
@ -657,6 +647,17 @@ static NSArray *faFromFc(FcPattern *pat)
|
|||
}
|
||||
}
|
||||
|
||||
// Derek Zhou claims that this takes over the ownership of the pattern
|
||||
if ((font_info = XftFontOpenPattern(xdpy, pattern)))
|
||||
{
|
||||
NSDebugLog(@"Loaded font: %@", fontName);
|
||||
}
|
||||
else
|
||||
{
|
||||
NSDebugLog(@"Cannot load font: %@", fontName);
|
||||
return NO;
|
||||
}
|
||||
|
||||
/* TODO: somehow make gnustep-gui send unicode our way. utf8? ugly, but it works */
|
||||
mostCompatibleStringEncoding = NSUTF8StringEncoding;
|
||||
encodingScheme = @"iso10646-1";
|
||||
|
|
Loading…
Reference in a new issue