turning off autohinting has no effect

Bug #60760 reported by paniq
10
Affects Status Importance Assigned to Milestone
freetype (Ubuntu)
Invalid
Undecided
Unassigned

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">
<fontconfig>
    <match target="font">
        <edit name="autohint" mode="assign">
            <bool>false</bool>
        </edit>
    </match>
</fontconfig>

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

Revision history for this message
paniq (paniq) wrote :

please have a look at these

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

http://www.leonard-ritter.com/files/images/how_it_should_be.png

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

http://www.leonard-ritter.com/files/images/how_it_is.png

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.

Revision history for this message
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.

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.

Revision history for this message
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.

Revision history for this message
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?

Revision history for this message
paniq (paniq) wrote :

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

i will check with 6.10 as well.

Revision history for this message
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?

Revision history for this message
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
Revision history for this message
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
Revision history for this message
Ahmad Syukri Abdollah (syockit) wrote :

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
Revision history for this message
xteejx (xteejx) wrote :

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.