freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] How to determine if horizontal hinting is happening?


From: Adam Goode
Subject: Re: [ft-devel] How to determine if horizontal hinting is happening?
Date: Fri, 16 Feb 2018 16:30:27 -0500

On Fri, Feb 16, 2018 at 12:39 PM, Adam Goode <address@hidden> wrote:
On Fri, Feb 16, 2018 at 12:19 PM, Alexei Podtelezhnikov <address@hidden> wrote:

> (letting me safely do subpixel positioning)

The lsb and rsb delta procedure works with and without hinting. It is the only workable procedure with hinting IMO. Why did you choose to stay away from it?


I am not sure! I will look into this. (I don't have any familiarity with this font handling part of the Chromium codebase.)



I looked into this. The rendering library is skia, which seems to be doing reasonable things when it comes to Freetype (I see references to delta and rsb/lsb).

The issue is that sometimes we want to start text at a non-integer position, but still align each glyph appropriately to allow for hinting to look correct. This means that depending on hinting parameters, we might want to round the final position of each glyph before displaying on screen. If the glyph is horizontally hinted, we do want to round to integer screen positions. But if the glyph is not horizontally hinted, we know that it is better to position the glyph at a subpixel position.

Skia already makes some optimizations based on this hinting knowledge. It knows that light hinting does not hint in the horizontal direction and avoids running hinting before computing metrics. But it doesn't know if other engines might not hint horizontally, and has to run the hinter before metric computation. That would be another place to use this information.


Thanks,

Adam


reply via email to

[Prev in Thread] Current Thread [Next in Thread]