[HarfBuzz] harfbuz uniscribe backend and firefox.
Behdad Esfahbod
behdad.esfahbod at gmail.com
Thu Aug 6 18:05:05 PDT 2015
Hi Tom,
On 15-08-07 01:15 AM, Tom Hindle wrote:
> Hello,
>
> Recently I created a experimental patch for Firefox to allow use of harfbuz's
> uniscribe backend, selectable via a about:config option.
>
> The patch can be seen here:
> https://hg.mozilla.org/try/rev/08eef5e76a40
I'm curious. Why did you do this?
> In order to get it work I had to make a couple of changes to hb-uniscribe.cc
>
> This was because when Firefox code calls
>
> hb_font_set_scale(mHBFont, scale, scale);
>
> Its scale values are "16.16 fixed point" format (floats converted to int by
> multiplying by 65536) and so it expects values returns by
> hb_buffer_get_glyph_positions to be the same format.
Yes, I had become aware of this, and that's why I stopped building the Win32
binaries with uniscribe backend enabled, until I fix it.
> I made hb-uniscribe.cc comply with this by scaling by ratio between
> font->(x|y)_ppem and font->(x|y)_scale.
>
> Is this something hb-uniscribe.cc should already be doing or is the Firefox
> code making unsafe assumptions?
The uniscribe backend should do this indeed. I did this in the CoreText
backend. Will check your code and fix it eventually.
Thanks,
behdad
> The latest gfxHarfBuzzShaper.cpp source code can be seen here:
> https://hg.mozilla.org/mozilla-central/file/03e3d77d1b6b/gfx/thebes/gfxHarfBuzzShaper.cpp
>
>
>
> Thanks
> Tom
>
>
>
>
>
>
> _______________________________________________
> HarfBuzz mailing list
> HarfBuzz at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/harfbuzz
More information about the HarfBuzz
mailing list