You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Text edge "bounds" not working for fonts without outlines #8074
Typst currently uses ttf_parser::Face::glyph_bounding_box for this which only handles outline glyphs, not svg or raster glyphs.
It looks like raster glyphs have enough metadata to find the bounding box without parsing the image data.
SVG glyphs look like a nightmare though: need to get from a SvgDocument (which can contain multiple glyphs which can appear anywhere in the document tree) to a bounding box of a particular glyph.
Activity
Lege19 commentedon Jun 3, 2026
Typst currently uses
ttf_parser::Face::glyph_bounding_boxfor this which only handles outline glyphs, not svg or raster glyphs.It looks like raster glyphs have enough metadata to find the bounding box without parsing the image data.
SVG glyphs look like a nightmare though: need to get from a
SvgDocument(which can contain multiple glyphs which can appear anywhere in the document tree) to a bounding box of a particular glyph.