-
Notifications
You must be signed in to change notification settings - Fork 65
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
CFF2 fonts with no vstore are rejected #275
Comments
@plokmijnuhby Could you attach an example of such a font (or point to a freely-available one)? I'd be reluctant to try fixing without a testcase on hand. |
I don't have a fully complete file available unfortunately (and I couldn't find one online). This file has no vstore and triggers the message, although it has other issues which are nothing to do with this bug. |
We should fix this. I don't immediately see where the error comes from. Can you please paste the error output at least? A test font would be best. |
When I debug the failure with this font, it's using operator byte 11 in TopDICT. There's no such operation in the CFF2 spec, so OTS fails. |
If a font using CFF2 has no variation data, according to the OTF spec, it should not reference a vstore in its top DICT. However, if it doesn't reference a vstore, OTS will reject it, with the message "Failed to parse Top DICT Data".
This happens because the code to check the top DICT (here) assumes that a vstore is present, reads the entire dict looking for it, gets to the end of the dict and can't read any more bytes, and complains.
The text was updated successfully, but these errors were encountered: