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

veraPDF (GreenField) fails to parse font opened correctly by PDF vievers, FontForge, freetype #1500

Open
ceztko opened this issue Jan 5, 2025 · 3 comments
Assignees
Milestone

Comments

@ceztko
Copy link

ceztko commented Jan 5, 2025

The attached file below produces the error "Can't parse font program of font" with veraPDF 1.27.102 GreenField (latest dev). VeraPdf obviously produce a failed PDF/A-1 report because of this problem. The document has been shrank to include only the failing part of the original content. The font is a subset of a CFF based font that was produced with the library components of afdko (I can provide the original font, if required). The subset opens correctly in PDF viewers, FontForge and the freetype library. I'm also attaching the extracted CFF font and the veraPDF report.

FontParseFailure.pdf
FontAndReport.zip

@MaximPlusov MaximPlusov self-assigned this Jan 5, 2025
@MaximPlusov MaximPlusov added this to the 1.28 milestone Jan 5, 2025
@bdoubrov
Copy link
Contributor

bdoubrov commented Jan 6, 2025

@ceztko it looks like veraPDF CFF parser is confused by the Name INDEX of the embedded CFF font (see Adobe Technical Note #5176, Section 7) that is supposed to store the PostScript name(s) of the font. In your case it just contains a zero length string.

I note that Adobe Preflight tool also gives this as a warning when inspecting this font:
image

We'll fix this case by also logging this as a warning and trying to parse the font further. I do agree this doesn't seem to be a critical parser error.

@ceztko
Copy link
Author

ceztko commented Jan 7, 2025

Thank you. The original font as you can imagine is 3rd party and it's manipulated by a reliable Adobe open source tool (afdko) which is probably just preserving the original content and performing as little validations as necessary. I am happy GreenField is being fixed to accept such fonts.

@MaximPlusov
Copy link
Contributor

Fixed in the latest dev build 1.27.108

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants