bugThe FreeType Project - Bugs: bug #49527, (S)light hinting invokes the...

 
 

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

bug #49527: (S)light hinting invokes the native hinter if possible - TrueType engine support.

Submitter:  zboobzor <zboobzor>
Submitted:  Thu 03 Nov 2016 05:42:19 PM UTC
   
 
Severity:  3 - Normal Item Group:  Wishlist
Status:  In Progress Privacy:  Public
Assigned to:  wl Open/Closed:  Open
Planned Release:  None

Jump to the original submission

Fri 15 May 2020 02:10:27 PM UTC, comment #6: 


comment #4:

> What about hinting at either twice or thrice the resolution, then scaling down?  The selection between 2x or 3x should be done to ideally get both the uppercase and the lowercase height at integer pixel borders...


The 3× hinting wouldn't really work with 4×4 oversampling. In 4×4 oversampling it would make more sense to snap to quarter pixels to avoid aliasing, because hinting is the only way to remove aliasing artifacts.

- <_194785>
Thu 05 Jan 2017 10:15:40 PM UTC, comment #5: 

Ah yes, I thought and forgot about that. I didn't and don't know enough of FT's internals to implement that idea. I'm going to try this one day. So much work, so little time...

Nikolaus Waxweiler <morksig>
Group Member
Wed 04 Jan 2017 11:38:57 AM UTC, comment #4: 

What about hinting at either twice or thrice the resolution, then scaling down?  The selection between 2x or 3x should be done to ideally get both the uppercase and the lowercase height at integer pixel borders...

Werner LEMBERG <wl>
Group administrator
Wed 04 Jan 2017 10:17:33 AM UTC, comment #3: 

I was really looking forward to this feature.
I would like to help but I don't know much about the inner workings of font hinting and rendering.
Maybe someone else can think of a solution to this tricky problem ?

zboobzor <zboobzor>
Mon 02 Jan 2017 09:48:02 PM UTC, comment #2: 

I'd love to, but I don't know how. The explicit nature of TrueType programming is more or less incompatible with the look of the Autohinter/CFF engine.

Basically, CFF fonts specify implicit hints and leave the final rendering to the engine. The CFF engine and the Autohinter just so happen to use almost the same approach of fitting glyphs to the grid, resulting in a smooth look across all sizes. That's why both look more or less the same with slight hinting.

TrueType is a different beast. The final rendering is left to the font author and his design choices. And those often just so happen to not look as smooth as what a CFF/autohinted font would look like (compare e.g. the native rendering of Source Sans Pro Regular, in .otf and .ttf flavor). The magic lies in clamping the outer curve of a glyph to the pixel grid while preserving the stem width. Less pixely-sharp but smoother.

Fudging the TrueType engine to display all fonts in a similar way to the CFF engine/Autohinter has not worked so far: ignoring hints on the X-axis is easy, stopping the font from clamping the Y-axis to full pixels (clamping curves to the pixel grid AND modifying the stem width) has proven... difficult, because you'd need to do this consistently across all fonts.

Maybe I'm overlooking something, but I have given up on this for now.

Nikolaus Waxweiler <morksig>
Group Member
Thu 03 Nov 2016 05:47:35 PM UTC, comment #1: 

Right now, this is work in progress.

Werner LEMBERG <wl>
Group administrator
Thu 03 Nov 2016 05:42:19 PM UTC, original submission:  

Since FreeType 2.6.2 (s)light hinting invokes the native hinter if possible with the OpenType/CFF driver.
(https://www.freetype.org/freetype2/docs/text-rendering-general.html#slight-hinting-invokes-the-native-hinter-if-possible)
Would it now be possible to support the TrueType engine ?

Thanks.

zboobzor <zboobzor>

 

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

No files currently attached

 

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 morksig (Posted a comment)
  • -email is unavailable- added by wl
  • -email is unavailable- added by wl (Posted a comment)
  • -email is unavailable- added by zboobzor (Submitted the item)
  •  

    There are 0 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.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-03 wl Carbon-Copy- Added -email is unavailable-
    2016-11-03 wl Carbon-CopyRemoved madigens -
    2016-11-03 wl StatusNone In Progress
        Assigned toNone wl
        Carbon-Copy- Added madigens

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code