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

2018-02-23 Thread Nikolaus Waxweiler
V40 may hint horizontally, including phantom points, outside of backwards compatibility mode, i.e. when rendering "native ClearType" fonts. Note that fonts can turn compatibility mode on and off per glyph. ___ Freetype-devel mailing list Freetype-devel@no

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

2018-02-22 Thread Alexei Podtelezhnikov
> To try to answer my question from before (please correct my errors!): You are confused because FT_LOAD_XXX combines bit flags with enum portion of FT_LOAD_TARGET_XXX https://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#FT_LOAD_XXX LIGHT, NORMAL (assuming native v40), and LC

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

2018-02-22 Thread Adam Goode
On Tue, Feb 20, 2018 at 5:10 PM, Behdad Esfahbod wrote: > On Tue, Feb 20, 2018 at 11:04 AM, Alexei Podtelezhnikov > wrote: >> >> >> >> >> > I think Skia does, by default, a 4x1 subpixel grid. >> >> >> >> ... which is almost the same as 3x1, which you would get for free from >> >> LCD rendering wi

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

2018-02-20 Thread Behdad Esfahbod
On Tue, Feb 20, 2018 at 11:04 AM, Alexei Podtelezhnikov wrote: > >> > >> > I think Skia does, by default, a 4x1 subpixel grid. > >> > >> ... which is almost the same as 3x1, which you would get for free from > >> LCD rendering with 3 channels shifted by 1/3.. 4x1 is such a minor > >> gain for a h

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

2018-02-20 Thread Alexei Podtelezhnikov
>> >> > I think Skia does, by default, a 4x1 subpixel grid. >> >> ... which is almost the same as 3x1, which you would get for free from >> LCD rendering with 3 channels shifted by 1/3.. 4x1 is such a minor >> gain for a huge cache waste. Just a suggestion. > > May I ruin your suggestion by suggest

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

2018-02-20 Thread Behdad Esfahbod
On Tue, Feb 20, 2018 at 10:35 AM, Alexei Podtelezhnikov wrote: > Adam, Behdad, thank you... > > > Chromium, on many configurations, does do subpixel positioning. > > Indeed I now see beautiful variations in LCD glyph images in the bug > report. You would not want to ruin that with hinting. Is thi

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

2018-02-20 Thread Alexei Podtelezhnikov
Adam, Behdad, thank you... > Chromium, on many configurations, does do subpixel positioning. Indeed I now see beautiful variations in LCD glyph images in the bug report. You would not want to ruin that with hinting. Is this the "bug"? Do not do hinting unless tricky. > I think Skia does, by defa

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

2018-02-20 Thread Behdad Esfahbod
Hi Alexei, Chromium, on many configurations, does do subpixel positioning. Just because we say that, doesn't mean it doesn't cache bitmaps. I think Skia does, by default, a 4x1 subpixel grid. That's implementation details though. On Tue, Feb 20, 2018 at 9:01 AM, Alexei Podtelezhnikov wrote: >

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

2018-02-20 Thread Adam Goode
On Tue, Feb 20, 2018 at 12:01 PM, Alexei Podtelezhnikov wrote: >> I'm not an expert on how the code works, but my understanding is that >> subpixel positioning is the norm. > > I highly doubt that Chromium implements subpixel positioning. This > isn't the norm. > > - LCD (subpixel) rendering is ab

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

2018-02-20 Thread Alexei Podtelezhnikov
> I'm not an expert on how the code works, but my understanding is that > subpixel positioning is the norm. I highly doubt that Chromium implements subpixel positioning. This isn't the norm. - LCD (subpixel) rendering is about utilizing color channels separately to improve glyph appearance. - Sub

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

2018-02-20 Thread Adam Goode
On Mon, Feb 19, 2018 at 5:06 PM, Alexei Podtelezhnikov wrote: >> Also, I don't think it's necessarily too late to get the information >> after FT_Load_Glyph is called. > > Adam, Ben, > > To be honest, I do not quite follow how Chromium does text rendering. > It was under impression that you guys d

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

2018-02-19 Thread Alexei Podtelezhnikov
> Also, I don't think it's necessarily too late to get the information > after FT_Load_Glyph is called. Adam, Ben, To be honest, I do not quite follow how Chromium does text rendering. It was under impression that you guys do font atlasing (aka preloading of font texture). We just provided preset

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

2018-02-19 Thread Adam Goode
On Mon, Feb 19, 2018 at 3:05 PM, Werner LEMBERG wrote: > What I need is a reliable mechanism (across Freetype versions and > fonts) to determine if a font has horizontal hinting applied or > not. It looks like it's something Freetype might need to > provide, since the true answer

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

2018-02-19 Thread Werner LEMBERG
What I need is a reliable mechanism (across Freetype versions and fonts) to determine if a font has horizontal hinting applied or not. It looks like it's something Freetype might need to provide, since the true answer seems to come from the interaction of flags, fonts, and

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

2018-02-19 Thread Alexei Podtelezhnikov
On Mon, Feb 19, 2018 at 6:41 AM, Alexei Podtelezhnikov wrote: > On Sun, Feb 18, 2018 at 6:11 PM, Werner LEMBERG wrote: >>> What I need is a reliable mechanism (across Freetype versions and >>> fonts) to determine if a font has horizontal hinting applied or not. >>> It looks like it's something Fr

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

2018-02-19 Thread Alexei Podtelezhnikov
On Sun, Feb 18, 2018 at 6:11 PM, Werner LEMBERG wrote: >> What I need is a reliable mechanism (across Freetype versions and >> fonts) to determine if a font has horizontal hinting applied or not. >> It looks like it's something Freetype might need to provide, since >> the true answer seems to come

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

2018-02-18 Thread Werner LEMBERG
> What I need is a reliable mechanism (across Freetype versions and > fonts) to determine if a font has horizontal hinting applied or not. > It looks like it's something Freetype might need to provide, since > the true answer seems to come from the interaction of flags, fonts, > and engines. > > C

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

2018-02-18 Thread Werner LEMBERG
> 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

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

2018-02-16 Thread Adam Goode
On Fri, Feb 16, 2018 at 12:39 PM, Adam Goode wrote: > On Fri, Feb 16, 2018 at 12:19 PM, Alexei Podtelezhnikov < > apodt...@gmail.com> wrote: > >> >> > (letting me safely do subpixel positioning) >> >> The lsb and rsb delta procedure works with and without hinting. It is the >> only workable proce

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

2018-02-16 Thread Adam Goode
On Fri, Feb 16, 2018 at 12:19 PM, Alexei Podtelezhnikov 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

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

2018-02-16 Thread Alexei Podtelezhnikov
> (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? ___ Freetype-devel mailing list Freetype-devel@

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

2018-02-16 Thread Adam Goode
On Fri, Feb 16, 2018 at 1:31 AM, Werner LEMBERG wrote: > > > > 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 ena

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

2018-02-15 Thread Werner LEMBERG
> 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