[HarfBuzz] Streamlining hb_font_t some more

Martin Hosken mhosken at gmail.com
Mon Oct 26 08:16:32 PDT 2015


Dear Simon,

> In InDesign, both (1) and (2) get 12 x 1.2 = 14.4pt interline space.
> This means that the descender of the "p" in "ipsum" will bump into
> letters on the next line. That's clearly wrong.
> 
> In the CSS model, both (1) and (2) get half leading added to the top and
> the bottom of the first line. So there is a gap between the first and
> second lines of (1) even though there is no large descender using that
> gap. That's not *wrong* but I don't like it. Imagine a large drop-cap
> "T" at the start of a paragraph - the line spacing after it becomes
> inconsistent.

Another approach is to say the ascent and descent of a line is the max(ascent, for all font ascents) and max(descent, for all font descents) on the line.

> I am not a typographer, I just play one on the Internet, so I am not
> sure what someone who was actually typesetting a book would do in that
> situation. My guess would be that they would, basically, do what SILE
> does right now (and what TeX does; perhaps Knuth knew what he was doing
> after all) - use consistent 14.4pt (or whatever) line spacing in
> situation (1) and use larger line spacing which fits in the descender in
> situation (2). But I would have to ask a real typesetter to know.

I like this, but as stated by Werner, if you think the OS/2 values don't make sense, then you could use the font bounding box and add 1pt interline gap or some such, as a fall back.

GB,
Martin


More information about the HarfBuzz mailing list