[HarfBuzz] What the correct way to set font size with FreeType?
behdad at behdad.org
Wed Mar 6 00:21:49 PST 2013
On 13-03-02 01:50 PM, Khaled Hosny wrote:
> Hi all,
> So far I have been calling FT_Set_Char_Size() with point size * 46
> before hb_ft_font_create(), but today I had a problem with Hiragino
> Mincho Pro (and other Mac Japanese fonts) returning huge glyph advances,
> after a bit of debugging I found that adding FT_LOAD_NO_BITMAP to
> load_flags in hb_ft_get_glyph_h_advance() fixes the issue, but since
> hb-view does not have a problem I think I'm doing something wrong here.
> Any insights?
For bitmap-only fonts, FT_Set_Char_Size() fails if the font is bitmap-only and
the size requested does not match any of the bitmap strike sizes in the font.
Maybe that's the issue? Or are you suggesting that the font is NOT bitmap-only?
More information about the HarfBuzz