Comment 3 for bug 60760

Revision history for this message
Ming Hua (minghua) wrote :

Okay, apparently I didn't hear the whole story. Now I've talked with him more, I hope I get it right this time.

There has been a bug in xft since the beginning about reading autohint setting of fontconfig properly, it existed in both 2.1.8.2 and 2.1.10. The symptom of the bug is that it can only read the "turn on autohint" setting from fontconfig, but not the "turn off autohint" setting.

However, before freetype 2.2, it turns off autohint by default, so even if xft didn't get the "turn off autohint" setting from fontconfig, it will just use the default setting of freetype, so everything is good.

Since freetype 2.2, the autohint is turned on by default. Now even if fontconfig specifies no autohint, as xft can't read it, it will use the freetype default, which is autohint on. Therefore it seems the freetype upgrade causes this bug. However, the real culprit is xft.

He showed me the following patch for xft 2.1.8.2, which should fix the "not reading autohint-off setting from fontconfig" issue:

--- libXft-2.1.8.2.orig/src/xftfreetype.c 2006-05-03 12:33:45.000000000 +0800
+++ libXft-2.1.8.2/src/xftfreetype.c 2006-05-03 12:39:12.000000000 +0800
@@ -625,6 +625,8 @@ XftFontInfoFill (Display *dpy, _Xconst F

     if (autohint)
  fi->load_flags |= FT_LOAD_FORCE_AUTOHINT;
+ else
+ fi->load_flags |= FT_LOAD_NO_AUTOHINT;

     /* disable global advance width (for broken DynaLab TT CJK fonts) */
     switch (FcPatternGetBool (pattern, FC_GLOBAL_ADVANCE, 0, &global_advance)) {

Hope these information are useful.