What is the correct way of determinging spacing between glyphs when rendering text?

Skip to first unread message


Jun 25, 2020, 4:28:14 AM6/25/20
to fonttools
I'm rendering text into SVG using fonttools, one thing I don't quite seem to get right is spacing.

Maybe that's because I'm not completely sure how the sata is stored in ttf files.

It looks like drawing shapes using a pen already takes into account the left side bearing.

If I move the starting point of the pen for the next glyph by the width attribute of _TTGlyphGlyf I get from the glyphset it seems to be leaving way too large gaps between glyphs.

So I was wondering if I need to do some maths to get the correct advance width.

Reply all
Reply to author
0 new messages