Trouble with Kerning / Letter Spacing
alexthegoodman opened this issue · 1 comments
Hello fontkit!
I really appreciate this fantastic library and am excited to be building a multi-page document editor with it and canvas.
I, probably like other amateurs, have ran into some issues calculating the correct sizing and thus positioning of my characters.
Thankfully, all of my code is easily accessed here in a single React Hook: https://github.com/alexthegoodman/commonos/blob/feature/multi-page-docs/hooks/useCanvasRTE.ts
As you can see in getCharacterBoundingBox()
, I must be calculating something incorrectly. Basically, my characters are off. See the attached image.
Thank you for any assistance!
It appears that I had loaded Inter as a font for fontkit, but was rendering some system font.
Feel free to delete this issue or keep it as reference for others! Thanks!