Fix xlib font size bug with newer Fontconfig.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@26000 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2008-01-24 18:44:37 +00:00
parent 4e47d7d7c2
commit e71f65baea
2 changed files with 9 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2008-01-24 Fred Kiefer <FredKiefer@gmx.de>
* Source/xlib/GSXftFontInfo.m (-setupAttributes): Use
FC_PIXEL_SIZE instead of FC_SIZE. Fixes #21912.
2008-01-21 Fred Kiefer <FredKiefer@gmx.de>
* Headers/x11/XGOpenGL.h,

View file

@ -512,7 +512,10 @@ static NSArray *faFromFc(FcPattern *pat)
fontPattern = FcPatternDuplicate([realFont font]);
// the only thing needs customization here is the size
FcPatternAddDouble(fontPattern, FC_SIZE, (double)(matrix[0]));
// FIXME: It would be correcter to use FC_SIZE as GNUstep should be
// using point measurements, but as the rest of the library uses pixel,
// we need to stick with that here.
FcPatternAddDouble(fontPattern, FC_PIXEL_SIZE, (double)(matrix[0]));
// Should do this only when size > 8
FcPatternAddBool(fontPattern, FC_AUTOHINT, FcTrue);
pattern = XftFontMatch(xdpy, defaultScreen, fontPattern, &fc_result);