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: Werner LEMBERG
Subject: Re: [ft-devel] How to determine if horizontal hinting is happening?
Date: Fri, 16 Feb 2018 07:31:05 +0100 (CET)

> I am working on a Chrome bug (crbug.com/740385) related to subpixel
> positioning and hinting.
> 
> There is currently an issue where glyphs do not get positioned
> correctly in all cases, and to solve this problem I need to enable
> subpixel positioning.
> 
> This works, except when horizontal hinting is enabled ("full
> hinting" in xft enables this). In this case, letters get smeared
> badly.
> 
> https://www.freetype.org/freetype2/docs/glyphs/glyphs-3.html
> suggests that I should do subpixel positioning if I am not hinting
> horizontally, which matches with my understanding.
> 
> Therefore, I would like to programatically determine if horizontal
> hinting is happening and base the subpixel positioning decision on
> this information.  But I have not been able to figure out how to do
> this.  Is there a way that avoids needing to know the internals of
> the engines?

Well, the decision whether you are using `full hinting' or not is
given by the load flags used in `FT_Load_Glyph'.  This is *external*
information given by Chrome itself!  FreeType overrides this only for
the very small class of `tricky' fonts which don't display correctly
otherwise; this can be tested with `FT_IS_TRICKY'.

Am I missing something?


    Werner



reply via email to

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