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

Eli Zaretskii eliz at gnu.org
Sat May 11 19:16:09 UTC 2019


> From: Behdad Esfahbod <behdad at behdad.org>
> Date: Sat, 11 May 2019 11:51:16 -0700
> Cc: Jonathan Kew <jfkthame at gmail.com>, 
> 	"harfbuzz at lists.freedesktop.org" <harfbuzz at lists.freedesktop.org>
> 
>  Not sure yet.  What is a "font" for this purpose?  Does it have to be
>  the full contents of a font file on disk?
> 
> Yes. The font file.  Maybe describe what you are trying to do?

I'm trying to use on MS-Windows the HarfBuzz shaping function for
Emacs, which Khaled wrote.  The code as written uses Freetype-specific
data (FT_Face), and I'm trying to provide it with the Windows
equivalents instead.

As for passing the font file's data to hb_blob_create: it is quite
unusual to manipulate physical font files on MS-Windows, the usual
paradigm is to use a "logical font", which is a specification for a
font, and then retrieve the metrics of the font using dedicated APIs.
So I wonder whether there's an alternative to accessing the physical
font files.

Thanks.


More information about the HarfBuzz mailing list