[HarfBuzz] How to get hb_face_t and hb_font_t without Freetype?
eliz at gnu.org
Sat May 11 09:39:44 UTC 2019
Is it possible to create a hb_face_t without going through Freetype?
If so, could someone please tell what that would entail?
The tutorial only shows how to create hb_font_t using Freetype, and I
found no other documentation related to this, except the functions'
signatures. The implementations of hb_ft_face_create and
hb_ft_face_create look deceptively simple, so maybe it wouldn't be
hard to implement something similar without going through Freetype.
But the question is what is needed from the data stashed away by
hb_blob_create, and where is that data used? I guess there are some
callbacks specific to Freetype which the HarfBuzz shaper needs, and
those callbacks need to access the blob data? But none of that seems
to be documented.
Could someone please post some information about these issues, or
point me to existing documentation if I missed it?
The context for these questions is WIP to add a HarfBuzz shaping
capabilities to Emacs on MS-Windows. The existing HarfBuzz
integration, for Posix platforms, uses Freetype, because Freetype is
already used by Emacs on Posix systems to access font capabilities.
But on Windows Emacs uses native Windows interfaces to access and
utilize font and text metrics data, so going through Freetype would
probably add interfaces whose equivalents already exist. The question
is how to use those equivalents to give HarfBuzz what it needs.
More information about the HarfBuzz