[HarfBuzz] How to get hb_face_t and hb_font_t without Freetype?

Eli Zaretskii eliz at gnu.org
Sun May 12 04:15:45 UTC 2019


> Cc: behdad at behdad.org, harfbuzz at lists.freedesktop.org
> From: Jonathan Kew <jfkthame at gmail.com>
> Date: Sat, 11 May 2019 22:15:46 +0100
> 
> > Would wrapping in a blob the buffer returned by GetFontData be enough?
> 
> If you use GetFontData to get the complete font as a single buffer (i.e. 
> pass zero for the dwTable parameter), yes.
> 
> Alternatively, you could use hb_face_create_for_tables, with a 
> reference_table_func that uses GetFontData to read individual tables 
> when harfbuzz asks for them.

OK, thanks.  I think this is a large chunk of the solution to my
problem.

Assuming that I want to use GetFontData, what factors and aspects
should I consider when deciding whether to create a single blob with
the entire font's data or to go for the hb_face_create_for_tables
variety?

Also, does HarfBuzz support TrueType Collection (TTC) files, and if
so, does it want the data only for the currently selected font or all
of the data?


More information about the HarfBuzz mailing list