On Fri, Feb 16, 2018 at 12:39 PM, Adam Goode <[email protected]> wrote:

> On Fri, Feb 16, 2018 at 12:19 PM, Alexei Podtelezhnikov <
> [email protected]> 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
_______________________________________________
Freetype-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype-devel

Reply via email to