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

embeddedFonts list is empty, FontFile=false in XML report #1519

Closed
karenhanson opened this issue Jun 12, 2023 · 0 comments
Closed

embeddedFonts list is empty, FontFile=false in XML report #1519

karenhanson opened this issue Jun 12, 2023 · 0 comments
Assignees
Labels
status: has PR The issue is being processed in a pull request
Milestone

Comments

@karenhanson
Copy link

I'm seeing the issue with reporting of embedded fonts described in the final bullet point of issue #1515. I thought I would log it as a separate issue as I have tested some EPUBs and can add a little context.

The embeddedFonts list appears to always be empty. The result is that the XML report shows FontFile=false for the fonts regardless of whether the font file is embedded or not. I tested the epub at the link below - this has embedded fonts and I see the FontFile parameter is false for each. In version 4.2.0 FontFile value was true for each font.
https://github.com/IDPF/epub3-samples/tree/main/30/moby-dick
I also tested obfuscated fonts. These are also showing as not embedded - again, earlier versions of EPUBCheck showed FontFile=true.
https://github.com/IDPF/epub3-samples/tree/master/30/wasteland-woff-obf
Finally, I tested this file. In this case the XML report accurately lists the font as not embedded (FontFile=false):
https://github.com/KBNLresearch/epubPolicyTests/tree/master/content/epub20_missingfontresource
By chance this fixes a bug from the previous EPUBCheck 4.2.0 where FontFile=true for this file.

I will note that the messages in each case do correctly indicate when a font is missing or obfuscated.

karenhanson added a commit to karenhanson/jhove that referenced this issue Jun 12, 2023
This first of all updated the pom.xml to reference EPUBCheck 5.0.1. The upgrade broke a number of tests. This commit resolves the differences. Specifically:
1. The report data generated by the tool no longer creates a list of Resources. The code has been modified to generate one, but it includes several files that weren't picked up using the original method. The ones it picked up by the new method seemed useful to include so I left them in there and updated the tests that count resources.
2. EPUBCheck was refactored to remove several redundant messages related to container.xml. I have removed checks for these messages from the tests
3. EPUBLocation was refactored requiring a minor code change
4. One of the test files shows as not valid according to new criteria where it previously was valid.
5. There appears to be a bug where all fonts are showing as not embedded. This is breaking some tests that specifically look at embedded fonts. I've logged an issue with EPUBCheck for this. (w3c/epubcheck#1519). By chance this change fixed a bug where FontFile was true instead of false for non-embedded fonts. The test for it was incorrect in the code. If the FontFile value issue is not resolved (assuming I've understood its purpose correctly), we will need to decide whether to remove the field as inaccurate, add code to calculate it via another route, or go forward with the code reflecting the EPUBCheck output and correct it in a future version.
@rdeltour rdeltour self-assigned this Jul 5, 2023
@rdeltour rdeltour added this to the Next maintenance release milestone Jul 5, 2023
@rdeltour rdeltour added the status: has PR The issue is being processed in a pull request label Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: has PR The issue is being processed in a pull request
Projects
None yet
Development

No branches or pull requests

2 participants