[HarfBuzz] Streamlining hb_font_t some more

Simon Cozens simon at simon-cozens.org
Fri Oct 9 06:32:33 PDT 2015


On 09/10/2015 15:09, Khaled Hosny wrote:
> On Thu, Oct 08, 2015 at 11:54:09AM -0400, Behdad Esfahbod wrote:
>>                                                               So, from my
>> point of view, you should NOT use this for line height calculation.  You
>> should just use the typographical ascender/descender of the font and hence not
>> need glyph bounding boxes in Sile at all.
> 
> Yes please, an approach similar to what browsers do would be much
> appreciated. TeX way of handling interline spacing has always been
> cumbersome and confusing (not that I know exactly what SILE do now, but
> the further from TeX way here the better).

OK. SILE currently does the same as TeX, and I agree that it's confusing.

I have just released SILE 0.9.3, so now I have a clean slate to play
with. I have merged the new shaping pipeline (sending whole paragraphs
to Harfbuzz) and moved over to HB OT functions, dropping the Freetype
dependency. This makes a *lot* of things happier. Bidi support is much
better, and it's now *much* faster too: my 28 page test document which
used to take 15 seconds in 0.9.3 now takes 5 seconds.

I'm happy to look at using the font ascender/descender metrics for line
heights - is there a good way to get those values out of Harfbuzz yet?
Grepping the repository doesn't turn up much. (There's also typographic
line gap information in the _hea table - should I be using that?)

Simon


More information about the HarfBuzz mailing list