Skip to main content

line_box

Function line_box 

Source
fn line_box(
    ascender: F48Dot16,
    descender: F48Dot16,
    line_gap: F48Dot16,
) -> LineBox
Expand description

Returns the design units per em to use for a font whose head holds stated.

This is stated if it is between 16 and 16384, and 1000 otherwise, which matches HarfBuzz. Returns a line with its ascender above the baseline and its descender below it.

The hhea, vhea and OS/2 descenders are negative by the specification, but some fonts store them positive, which would put the bottom of the line above the baseline. Either end is read by its size alone. The gap is kept as stored.