otLayoutGetFontExtents2

Fetches script/language-specific font extents. These values are looked up in the BASE table's MinMax records.

If no such extents are found, the default extents for the font are fetched. As such, the return value of this function can for the most part be ignored. Note that the per-script/language extents do not have a line-gap value, and the line-gap is set to zero in that case.

This function is like harfbuzz.global.otLayoutGetFontExtents but takes #hb_script_t and #hb_language_t instead of OpenType #hb_tag_t.

Parameters

font harfbuzz.font.Font

a font

direction harfbuzz.types.Direction

text direction.

script harfbuzz.types.Script

script.

language harfbuzz.types.Language

language.

extents harfbuzz.types.FontExtents

font extents if found.

Return Value

Type: harfbuzz.types.Bool

true if found script/language-specific font extents.