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:
FredKiefer 2003-03-01 00:42:05 +00:00
parent 3d9d38a5cc
commit f86d46c607

View file

@ -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";