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

Improper letter spacing in some cases #24

Open
glebkudr opened this issue Dec 3, 2024 · 3 comments
Open

Improper letter spacing in some cases #24

glebkudr opened this issue Dec 3, 2024 · 3 comments

Comments

@glebkudr
Copy link

glebkudr commented Dec 3, 2024

When I mix Cyrillic and Georgian alphabet, I have some weird bug when I switch from one to another

Two letters to play with ლ and Щ

e25ef00c5db0097544bb11b993dd0008
@glebkudr glebkudr changed the title Proper letter spacing in some cases Improper letter spacing in some cases Dec 3, 2024
@chearon
Copy link
Owner

chearon commented Dec 3, 2024

Can you reproduce the issue in the playground and paste the HTML here? That downloads Noto Sans fonts and uses them.

If you're using node-canvas like the examples, it often draws text with the wrong font, especially on Linux. If that is the case, you may not see the issue in the playground. I'm in the midst of rewriting node-canvas's font stack and I might finish by the end of the year.

@glebkudr
Copy link
Author

glebkudr commented Dec 4, 2024

I can't reproduce it in the playground. Careful investigation shows that the problem is when we use Arial font instead of Noto fonts. Arial lacks the georgian glyphs and the error must be connected with this.

@chearon
Copy link
Owner

chearon commented Dec 4, 2024

That would do it. You want to register all fonts with dropflow, even fallbacks, so registering Arial might fix it. Dropflow makes fillText calls on the original text even if it didn't produce glyphs, so the canvas is doing its own fallbacks. Painting glyphs directly is something I'm working on too, which would produce more obvious errors.

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

2 participants