The original font-face test turned into four tests, one font format each#307
The original font-face test turned into four tests, one font format each#307
Conversation
|
@mattgarrish I am not familiar with the "structural" tests used for epubcheck: shouldn't there be a test for each media type (including the non-standard ones)? (Maybe they are already there, though.) |
|
w3c/epub-specs#2727 must be merged if this PR gets merged. |
Yes, there are two test files for font (and other) core media types:
The first test file is for the preferred media types - the ones listed first in the CMT table. So when this non-preferred media type for TTF is added it will go in the second file. Since epubcheck will report the manifest entry that fails, it doesn't need multiple files to be as specific. Is that what you wanted to know? |
Yes, that is what I wanted to know indeed. What I would suggest (so that we would not forget) is to do the change in the second test right away (and then we can forget about this topic). (I am not familiar with the testing structure, i.e., if just changing the OPF file is all that has to be done, or does it require other changes. If it is only the OPF file, then I am happy to raise a PR with the change.) |
You'd also need to update the allowed font media types, otherwise epubcheck won't build with errors. To do that, I believe you just need to add the media type the appropriate spots in isBlessedFontType and getPreferredMediaType. |
|
Ok, I have created a PR for epubcheck: w3c/epubcheck#1614 |
mattgarrish
left a comment
There was a problem hiding this comment.
This looks fine per the spec, but I'm wondering why SVG fonts aren't in the list. I'll open an issue about this.
As agreed in #306 (comment) : the original font-face test separated into four separate tests, one each for the truetype, opentype, woff, and woff2 formats, respectively.