turning off autohinting has no effect

Bug #60760 reported by paniq on 2006-09-16
Affects Status Importance Assigned to Milestone
freetype (Ubuntu)

Bug Description

a local.conf or ~/.font.conf with following content shows no difference to the current mode of rendering:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
    <match target="font">
        <edit name="autohint" mode="assign">

i would expect the bci renderer to be enabled at this point. tahoma, verdana, none of these fonts renders correctly when antialiasing is disabled.

paniq (paniq) wrote :

please have a look at these

i took this screenshot in a vm. it shows proper native hinting.


this is my live system with most recent packages installed, as you can see. it shows autohinting. native hinting has no effect.


note that this does not only affect the distance between letters. note, for example, the 2 pixel difference between strokes in the "f" letter.

the effect becomes even more dramatic with fonts like tahoma or segoe ui.

Ming Hua (minghua) wrote :

I discussed this with a user, and he says this is more likely due to the new libxft2 (2.1.10) ignoring the autohint setting by fontconfig.

If that's the case, using the ftstring tool in freetype2-demos should show same results on two systems, as (I assume) ftstring talks with libfreetype6 directly without going through libxft2.

I don't have an edgy system though so I can't test.

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 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, which should fix the "not reading autohint-off setting from fontconfig" issue:

--- libXft- 2006-05-03 12:33:45.000000000 +0800
+++ libXft- 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.

paniq (paniq) wrote :

i applied the patch, rebuilt the source and installed it, but no change. i restarted x, made sure both .fonts.conf and local.conf were set up correctly and autohinting was disabled explicitly.

rubinstein (rubinstein) wrote :

Any news on this?

If you look at Bug #63403:
Semi-random ugly font rendering in Edgy (no font hinting), is there the possibility that this bug also suffers from the xft-freetype issue?

paniq (paniq) wrote :

i have to add that i experienced this with 6.06 only.

i will check with 6.10 as well.

Xavier (chantry-xavier) wrote :

I didn't have any problem disabling and enabling autohinting in debian or ubuntu since I started using it.
I just do dpkg-reconfigure fontconfig-config
When you select native hinting, it doesn't create any symlink
When you select autohinting, it creates a symlink in /etc/fonts/conf.d/ to a file which enables autohinting.

So it seems native hinting is enabled by default. Or am I wrong?

Jean-Baptiste Lallement (jibel) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering is this still an issue for you? Can you try with latest Ubuntu release? Thanks in advance.

Changed in freetype:
status: New → Incomplete
Jean-Baptiste Lallement (jibel) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in freetype:
status: Incomplete → Invalid

See if the following glyphs come out as any numbers (they are unicodes U+F000 and U+F001 repectively) when using DejaVu Sans:
If you get something like 88 for both, then chances are, autohinting is enabled. I too have explicitly disabled it in my .fonts.conf, yet it appears as 88 in gucharmap.

Changed in freetype (Ubuntu):
status: Invalid → New
Changed in freetype (Ubuntu):
status: New → Invalid
status: Invalid → New

This bug report is being closed, as there has been no response despite 2 requests for more information. If you are able to give us the information, please do so by opening another bug report. Thank you.

Changed in freetype (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers