[HarfBuzz] Getting glyph information using Harfbuzz API

Khaled Hosny khaledhosny at eglug.org
Wed May 24 23:32:48 UTC 2017


On Wed, May 24, 2017 at 03:54:59PM -0700, Behdad Esfahbod wrote:
> Hi Deepak,
> 
> On Tue, May 23, 2017 at 8:45 PM, Deepak Jois <deepak.jois at gmail.com> wrote:
> 
> > 3 I suppose if I have (1) above I can get a hb_glyph_extents_t for each
> > glyph. I am not sure how to convert it to a value that makes sense to
> > LuaTeX which requires a width, depth and height.
> >
> 
> Right.  Simon Cozens also wanted this for Sile... Problem is, in the TeX
> model, the depth and height are "logical" boundaries, not glyph ink
> extents.  Those numbers do not exist in OpenType.  For width, you want
> advance width.  For depth and height, you really are on your own IMO.
> Glyph extents are a bad fallback.

I don’t know about Sile, but in XeTeX get height and depth from glyph
extents and it works rather well in practice (TFM files can sometimes do
creative things to the depth and height like having the same depth and
height for plus and minus glyphs so they align in math mode, but people
don’t seem to be missing this flexibility that much).

Regards,
Khaled


More information about the HarfBuzz mailing list