-
Notifications
You must be signed in to change notification settings - Fork 205
Unable to load newer fonts in Zend_Pdf #439
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
Comments
I just took deeper look about this issue and managed to reproduce the issue and dug little bit deeper: "Version 4 was defined in OpenType 1.5. Version 4 has two fewer fields than version 5, and the same fields as in version 3. Although new fields were not added beyond those in version 3, the specification of certain fields was revised." (https://learn.microsoft.com/en-us/typography/opentype/spec/os2#version-4-table-format) I'm gonna take a closer look on those revised fields, report back and possible create a PR if it's trivial change. |
Had some spare time, so here's some results. Changed OS/2 fields between v3 and v4:
Impacts on code:
Created a pull request to add support for v4 OS/2 tables - will open a bug about ulUnicodeRange -support! |
THank you. |
Uh oh!
There was an error while loading. Please reload this page.
If you try to load a newer font using Zend_Pdf, you get an error
Unable to read version 4 table
. The check is done at:This is because newer fonts use OS/2 table version 4, which is similar to 3. There are no structural differences between OS/2 v3 and OS/2 v4. Changing the value on the if statement will make fonts work most of the time. There are some specification differences, although and I can't find any information on how they differ.
I am trying to use the font Inter in my PDFs.
I've searched for a way to convert from v4 to v3 but can't find any easy way to do so. Would it be hard to implement this change?
The text was updated successfully, but these errors were encountered: