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

OS/2 vs hhea font metrics for ascender/descender #339

Open
null77 opened this issue Jul 10, 2024 · 0 comments
Open

OS/2 vs hhea font metrics for ascender/descender #339

null77 opened this issue Jul 10, 2024 · 0 comments

Comments

@null77
Copy link

null77 commented Jul 10, 2024

Quite a while ago this change:

9d1ffe4

Moved from using OS/2 to hhea metrics for ascender/descender/etc. I'm wondering if there's any record of what motivated this change?

For context, I'm trying to align the rendering output from PDFKit with a WebGL font library (https://www.npmjs.com/package/troika-three-text) and during my investigation I found that PDFKit and the troika text library disagree on these font metrics. This only affects some fonts, e.g. Trirong Regular (https://fonts.google.com/specimen/Trirong?query=trirong).

More context at protectwise/troika#320 . In particular the maintainer noted the library is consistent with the CSS spec and the MS OpenType format docs. Is fontkit potentially doing the wrong thing? Is there a different spec that fontkit uses for its metrics init?

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