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

EPUB3 otf fonts - incorrect media-type #1761

Closed
andrecastro0o opened this issue Nov 14, 2014 · 1 comment
Closed

EPUB3 otf fonts - incorrect media-type #1761

andrecastro0o opened this issue Nov 14, 2014 · 1 comment

Comments

@andrecastro0o
Copy link

EPUB3 media-type for a otf font in item manifest should be application/vnd.ms-opentype instead of application/x-font-opentype

When converting a markdown to epub3 using --epub-embed-font and otf fonts the conversion results in EPUB where the manifest item for the font has an incorrect media-type. It uses:
<item id="VAGRoundedStd-Thin_otf" href="VAGRoundedStd-Thin.otf" media-type="application/x-font-opentype" />

The recommendation is to use media-type="application/vnd.ms-opentype":

"The media type application/vnd.ms-opentype should be specified as the media-type value in the item of the manifest that references an OpenType font." http://www.idpf.org/epub/20/spec/OPF_2.0.1_draft.htm#Section2.3.1

When checking the EPUB with epubcheck it trows an Warning cause by the media-type media-type="application/x-font-opentype" : WARN: /stylesheet.css(5): Font-face reference VAGRoundedStd-Light.otf to non-standard font type application/x-font-opentype

@elmimmo
Copy link

elmimmo commented Nov 15, 2014

I think @andrecastro0o’s recommendation is appropriate. EPUB 3’s specs, too, state application/vnd.ms-opentype for OpenType fonts as a Core Media Type (i.e. native to EPUB and thus not requiring an explicit fallback).

Still, even if @andrecastro0o proposal is accepted (which I think it should), it should also be taken into account that application/vnd.ms-opentype might be the appropriate MIME type for TTF and OTF fonts (both of which are OpenType; not WOFF, though) in EPUB 3 only temporarily: application/vnd.ms-opentype is a vendor-specific media type that was created in lack of a IANA-approved standard one for those. Now there is one (application/font-sfnt) and issues requesting updating the EPUB 3 specs and, subject to the former’s resolution, epubcheck’s validation of that have been risen.

So, irrespective of this issue's resolution, Pandoc should keep those other issues in EPUB 3 and epubcheck on its look, and update EPUB 3's output accordingly depending on their resolution (not EPUB 2’s, whose spec is frozen and therefore mime type for fonts in that should be changed to application/vnd.ms-opentype and stay there).

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

No branches or pull requests

2 participants