Lua SDK: font:getGlyphKerning

The C SDK has a getGlyphKerning function to get the kerning adjustment between two characters in a font. It would be really nice to have this in the Lua SDK as well!

My use-case is animating dialogue boxes so that text comes in character-by-character, as is done in many games. Do do this, I'm drawing text as individual characters, but this means that kerning is lost and I'd like to preserve it.

Would be cool to be able to set it also. To correct/adjust kerning in system fonts.

1 Like

Indeed! Would be interesting to be able to tweak fonts once they're loaded overall. I noticed that you can edit the image returned by getGlyph() to edit a character. If we had a way to get a list of a font's available characters and insert our own, we could do things like inserting extra languages into the system font too. I suspect that's a little more work though!

1 Like

We'd have to add copy-on-write for that, but it's doable. The system fonts are in flash memory on the device. :slight_smile:

1 Like