bugThe FreeType Project - Bugs: bug #24357, Autohinter poorly hints U+0119 ę...


You are not allowed to post comments on this tracker with your current authentication level.

bug #24357: Autohinter poorly hints U+0119 ę in DejaVu Sans

Submitter:  Marcin Kowalczyk <qrczak>
Submitted:  Tue 23 Sep 2008 04:19:41 PM UTC
Votes:  50  
Severity:  3 - Normal Item Group:  Incorrect behaviour
Status:  Confirmed Privacy:  Public
Assigned to:  freetype Open/Closed:  Open
Planned Release:  None
* Mandatory Fields

Add a New Comment (Rich Markup)

Comment Type & Canned Response:
       No canned response available


( Jump to the original submission )

Fri 15 May 2020 01:54:07 PM UTC, comment #7: 

For font designers using ttfautohint, to fix it they have to make the glyphs (ą, ę, etc.) referenced and disable the Hint Composites option.

- <_194785>
Fri 15 May 2020 01:49:40 PM UTC, comment #6: 

That's exactly the point of references, to ensure consistent hinting on glyph portions intended to be exactly the same. However, not all fonts that have this glyph have it referenced, so it ends up with suboptimal hinting. This is an issue in the underlying hinter, named ttfautohint. One could argue it is not objectively an issue because if the references weren't added, this means things like this are allowed to happen. Another one could argue that this is a real issue because accented letters are meant to be consistent even if not referenced.

- <_194785>
Fri 29 Oct 2010 03:51:21 PM UTC, comment #5: 

Although this bug is less important since true type bytecode is enabled by default, I still tried to investigate this issue.

I compiled freetype without truetype bytecode interpreter and tracked down the differences between the two glyphes. I discovered that in af_latin_hint_edges, an anchor edge is computed in the first part of the function. And it is different for the e and the ę (for the ę, I think it's part of the ogonek). This probably happens because freetype uses the first blue edge encountered as an anchor. Then, when snapping the horizontal bar, org_pos, computed as anchor->pos + ( edge->opos - anchor->opos ) is not the same.

I could not investigate more nor try working on a patch because I failed to understand algorithm behind anchor edge (what is it and how does it work?). I also failed to get the big picture of blue edge stuff. Reading "Real-Time Grid Fitting of Typographic Outlines" didn't help.

arno <arenevier>
Sat 03 Oct 2009 09:14:00 PM UTC, comment #4: 

Yes, this bug doesn't depend on a font
I produced screenshots (Ubuntu 9.04) with different fonts (some chars got replaced due to the missing glyphs in the char table, but it's easy to see which ones)

i quickly tested Arial, Verdana, DejavuSans, DejavuSerif, TrebuchetMS, NimbusSans and Georgia using Ubuntu font configuration options - ę is broken at some sizes in the 10-14 range in every case. Horizontal line is 1px off, this sometimes happens to the capital letter (Ę) too albeit less often.

While looking carefully at the DejavuSans I noticed that the base shape of the e glyph is distorted when there is some modifier at the bottom (dots, ogonek, whatever). Modifiers above seem not to produce any unwanted effects.
I couldn't check my findings with other fonts because usually they don't cover these obscure e derivatives.

This issue may not appear serious, because only ę is common enough to be included in a common font, but I am sure there would be problems with all unicode fonts having extensive set of glyphs that cover other e's with modifiers. I just don't understand why e is so magic when combined with other stuff :)

This issue may not appear serious but it's annoying to say the least. It's a vowel you can often see multiple times in a single sentence in Polish (for example in the simple sentence "I will love you" you get it 3x) and you literally can't find even single font that scales well in the 10-14 range (especially sansserif type).

MKK <vaphell>
Thu 21 May 2009 08:35:44 AM UTC, comment #3: 

I've also noticed that this doesn't depend on font. I've checked with Liberation font (17pt) and there is the same problem there.

It looks like autohinter fails with this U+0119 composite glyph. Somehow it doesn't work well for it.

Tomasz Kalkosiński <pppspoonman>
Tue 12 May 2009 10:34:09 AM UTC, comment #2: 

I confirm that. I've also submitted bug here: http://bugs.freedesktop.org/show_bug.cgi?id=21664 .

David, can you please take a look at this? Thanks in advance.

Tomasz Kalkosiński <pppspoonman>
Sun 05 Oct 2008 07:08:40 AM UTC, comment #1: 

[Using DejaVu Sans 2.26]

I can confirm this, using ftstring of the current CVS.
Apparently, the computation of the local constraints are too aggressive, influencing the whole glyph.

David, can you check this?

Werner LEMBERG <wl>
Project Administrator
Tue 23 Sep 2008 04:19:41 PM UTC, original submission:  

With autohinting (“slight hinting” in Gnome settings), in DejaVu Sans and Sans Mono, ‘e’ and ‘ę’ at some sizes have the horizontal bar at different heights; ‘e’ is fine, ‘ę’ is ugly.

In the font the ę glyph is made of two subglyphs: ‘e’ + ogonek, so this is not the fault of the font.

Marcin Kowalczyk <qrczak>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #18810:  trebuchet_ms_14.png added by vaphell (3KiB - image/png)
file #18809:  verdana_14.png added by vaphell (4KiB - image/png)
file #18808:  dejavu_sans_13.png added by vaphell (3KiB - image/png)
file #18807:  arial_12.png added by vaphell (3KiB - image/png)
file #18172:  liberation.jpg added by pppspoonman (24KiB - image/jpeg - Liberation autohinter failure.)
file #16553:  eogonek.png added by qrczak (25KiB - image/png - Firefox screenshot and its HTML source.)
file #16554:  eogonek.html added by qrczak (2KiB - text/html - Firefox screenshot and its HTML source.)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by _194785 (Posted a comment)
  • -email is unavailable- added by arenevier (Posted a comment)
  • -email is unavailable- added by vaphell (Updated the item)
  • -email is unavailable- added by pmw
  • -email is unavailable- added by pppspoonman (Posted a comment)
  • -email is unavailable- added by pppspoonman (Voted in favor of this item)
  • -email is unavailable- added by wl (Posted a comment)
  • -email is unavailable- added by qrczak (Submitted the item)

    There are 50 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.





    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-10-03 vaphell Attached File- Added trebuchet_ms_14.png, #18810
        Attached File- Added arial_12.png, #18807
        Attached File- Added dejavu_sans_13.png, #18808
        Attached File- Added verdana_14.png, #18809
    2009-08-18 pmw Carbon-Copy- Added -email is unavailable-
    2009-05-21 pppspoonman Attached File- Added liberation.jpg, #18172
    2009-05-12 pppspoonman Carbon-Copy- Added pppspoonman
    2008-10-05 wl StatusNone Confirmed
        Assigned toNone freetype
    2008-09-23 qrczak Attached File- Added eogonek.png, #16553
        Attached File- Added eogonek.html, #16554

    Back to the top

    Powered by Savane 3.9