bugThe FreeType Project - Bugs: bug #12264, Ugly auto-hinting of touching...


bug #12264: Ugly auto-hinting of touching straight lines

Submitted by:  David Turner <freetype>
Submitted on:  Wed 09 Mar 2005 04:53:56 PM UTC  
Severity: 2 - MinorItem Group: Incorrect behaviour
Status: Wont FixPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: None

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Sat 06 Dec 2014 01:51:37 PM UTC, comment #4:

I thought that difference between strong and weak interpolation is that the former applies to the entire outline, regardless of orientation, often as a the last step of hinting. The latter works within one contour between some of its points.

Alexei Podtelezhnikov <podtelez>
Project Member
Fri 05 Dec 2014 07:38:17 PM UTC, comment #3:

This won't work, since you can only interpolate weak points between strong points that are on the same outline, and exactly this is the problem here: The touching lines have opposite directions because they are located on different outlines, and this is a good reason for the auto-hinter to not align them...

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Fri 05 Dec 2014 02:16:27 PM UTC, comment #2:

This should have been dealt with by strong interpolation. Namely, only high vertical beams should be snapped to grid, the rest should just be interpolated.

Alexei Podtelezhnikov <podtelez>
Project Member
Fri 05 Dec 2014 07:37:54 AM UTC, comment #1:

This problem is still present even in the forthcoming 2.5.4 release. Here's an excerpt of the `FT2_DEBUG=any:7' output showing the auto-hinter's actions for hinting vertical stems at 17ppem:

latin vertical edge hinting (style `latn_dflt')
ANCHOR: edge 0 (opos=2.12) and 1 (opos=4.25) snapped to 2.00 and 4.25
LINK: edge 1 (opos=4.25) linked to 4.12, dist was 2.12, now 2.12
ADJUST: edge 1 (pos=4.12) moved to 4.12
STEM: edge 2 (opos=4.25) linked to 3 (opos=6.38) snapped to 4.00 and 6.12
BOUND: edge 2 (pos=4.00) moved to 4.12
STEM: edge 4 (opos=6.38) linked to 5 (opos=8.50) snapped to 6.00 and 8.12
BOUND: edge 4 (pos=6.00) moved to 6.12
STEM: edge 6 (opos=8.50) linked to 7 (opos=10.62) snapped to 8.00 and 10.12
BOUND: edge 6 (pos=8.00) moved to 8.12
STEM: edge 8 (opos=10.62) linked to 9 (opos=12.75) snapped to 10.88 and 13.00

The difference between the original and snapped positions becomes greater and greater until the last STEM action rounds up and not down. This snaps edges 8 and 9 to the right, leaving an ugly gap more than half a pixel between edge 7 and 8.

I don't see an easy solution. Of course, the original glyph shape of this test font is (intentionally) bad; a designer must never use touching straight lines that don't share common points. Or even better, the touching should be completely removed, something that recent font editors are able to do gracefully.

For this reason, I'm marking the report as `wontfix'.

(file #32597)

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Wed 09 Mar 2005 04:53:56 PM UTC, original submission:

The auto-hinter (or its new incarnation called the auto-fitter) doesn't properly hint the "#" glyph in the test fonts attached to this bug report.

It seems that it either separates overlapping segments, creating visible gaps, or creates too-wide stems.

David Turner <freetype>
Project Administrator


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

Attach File(s):

Attached Files
file #32597:  autohint2.png added by wl (5KiB - image/png)
file #2702:  autohint3.ttf added by freetype (2KiB - application/octet-stream)
file #2701:  autohint2.ttf added by freetype (2KiB - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by podtelez (Posted a comment)
  • -unavailable- added by wl (Updated the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 05 Dec 2014 07:37:54 AM UTCwlAttached File-=>Added autohint2.png, #32597
      StatusNone=>Wont Fix
      Assigned tofreetype=>wl
      SummaryUgly auto-hinting of # glyph in test font=>Ugly auto-hinting of touching straight lines
    Wed 09 Mar 2005 04:54:17 PM UTCfreetypeAttached File-=>Added autohint3.ttf, #2295
    Wed 09 Mar 2005 04:53:56 PM UTCfreetypeAttached File-=>Added autohint2.ttf, #2294

    Back to the top

    Powered by Savane 3.1-cleanup1