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

 
 

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

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

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

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>
Project 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>
Project AdministratorIn charge of this item.
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>
Project Member
Thu 03 Nov 2016 05:47:35 PM UTC, comment #1: 

Right now, this is work in progress.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
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.)

Attach Files:
   
   
Comment:
   

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 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)
  •  

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

    Only logged-in users can vote.

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-03 wl Carbon-Copy- => Added madigens@gmail.com
    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.5