<div dir="ltr">Try using hb-ot-font.h font_funcs instead of hb-ft.h one.  hb-ft needs fixing for bitmap fonts...<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 19, 2017 at 1:45 AM, Takao Fujiwara <span dir="ltr"><<a href="mailto:fujiwara@redhat.com" target="_blank">fujiwara@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'd like to get a character width and height and am thinking to use hb_buffer_get_glyph_positions(<wbr>)->x_advance .<br>
<br>
I tried hello-harfbuzz with noto-emoji fonts:<br>
<a href="https://github.com/behdad/harfbuzz-tutorial/blob/master/hello-harfbuzz.c" rel="noreferrer" target="_blank">https://github.com/behdad/harf<wbr>buzz-tutorial/blob/master/hell<wbr>o-harfbuzz.c</a><br>
<a href="https://github.com/googlei18n/noto-emoji/tree/master/fonts" rel="noreferrer" target="_blank">https://github.com/googlei18n/<wbr>noto-emoji/tree/master/fonts</a><br>
<br>
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.<br>
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.<br>
<br>
Do you have any ideas to resolve it?<br>
<br>
I'm using harfbuzz 1.3.2 and freetype 2.6.5 and testing U+1F469.<br>
<br>
% ./hello-harfbuzz \<br>
    /usr/share/fonts/google-noto-e<wbr>moji/NotoColorEmoji.ttf \<br>
    "👩‍"<br>
<br>
Seems NotoEmoji-Reqular.ttf is a scalable font and NotoColorEmoji.ttf is a fixed size font.<br>
<br>
______________________________<wbr>_________________<br>
HarfBuzz mailing list<br>
<a href="mailto:HarfBuzz@lists.freedesktop.org" target="_blank">HarfBuzz@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/harfbuzz" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/harfbuzz</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">behdad<br><a href="http://behdad.org/" target="_blank">http://behdad.org/</a></div>
</div>