[HarfBuzz] hb_buffer_get_glyph_positions() for NotoColorEmoji.ttf

Behdad Esfahbod behdad at behdad.org
Sun May 21 01:17:12 UTC 2017


Try using hb-ot-font.h font_funcs instead of hb-ft.h one.  hb-ft needs
fixing for bitmap fonts...

On Fri, May 19, 2017 at 1:45 AM, Takao Fujiwara <fujiwara at redhat.com> wrote:

> I'd like to get a character width and height and am thinking to use
> hb_buffer_get_glyph_positions()->x_advance .
>
> I tried hello-harfbuzz with noto-emoji fonts:
> https://github.com/behdad/harfbuzz-tutorial/blob/master/hello-harfbuzz.c
> https://github.com/googlei18n/noto-emoji/tree/master/fonts
>
> Seems hello-harfbuzz can get x_advance with NotoEmoji-Reqular.ttf but it
> failed in FT_Set_Char_Size() or FT_Set_Pixel_Sizes() with
> NotoColorEmoji.ttf.
> Even if I ignore the return value of FT_THROW(Invalid_Pixel_Size) from
> FT_Set_Pixel_Sizes(), seems hello-harfbuzz does not return the accurate
> x_advance.
>
> Do you have any ideas to resolve it?
>
> I'm using harfbuzz 1.3.2 and freetype 2.6.5 and testing U+1F469.
>
> % ./hello-harfbuzz \
>     /usr/share/fonts/google-noto-emoji/NotoColorEmoji.ttf \
>     "👩‍"
>
> Seems NotoEmoji-Reqular.ttf is a scalable font and NotoColorEmoji.ttf is a
> fixed size font.
>
> _______________________________________________
> HarfBuzz mailing list
> HarfBuzz at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/harfbuzz
>



-- 
behdad
http://behdad.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/harfbuzz/attachments/20170520/195f3f25/attachment.html>


More information about the HarfBuzz mailing list