Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble with Kerning / Letter Spacing #328

Open
alexthegoodman opened this issue Mar 10, 2024 · 1 comment
Open

Trouble with Kerning / Letter Spacing #328

alexthegoodman opened this issue Mar 10, 2024 · 1 comment

Comments

@alexthegoodman
Copy link

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.

GIVjB8UWIAAQkwK

Thank you for any assistance!

@alexthegoodman
Copy link
Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant