-
Notifications
You must be signed in to change notification settings - Fork 49
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
Height estimation is incorrect for a majority of custom fonts #93
Comments
I've just updated to 4.1.1 (sorry about that and the last issue), and it seems like now it also completely ignores the context textBaseline? The issue otherwise is still present |
I wonder if this is because of the way the library currently calculates the height of the text by setting the baseline to 'bottom' and use the In #95, I propose to move the library to use those newer metrics if available (note that the Node-based |
I noticed that there was a new package released by a third party as a result. I'm not sure if it actually fixed the issue since I can't change the font in their demo, but if it has, would you be able to look into adding it into this package? |
@geongeorge Bumping this since an update to my software is coming soon. If you could take a look at both the non-functional baseline config and the line height estimation, I'd really appreciate it. |
In the screenshot I've loaded Source Sans Pro on the right which works correctly and is perfectly centered,
I also loaded in a random TTF font from dafont, and it's not centered. This is the case for most custom fonts I load, especially the artsy ones.
Changing the baseline, unfortunately, doesn't help much, with ideographic being the closest to being centered, and the rest just putting it even lower
The text was updated successfully, but these errors were encountered: