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

Add application/font-sfnt as a legal media type for .ttf and .otf files #339

Closed
baldurbjarnason opened this issue Feb 16, 2014 · 10 comments
Closed
Labels
spec: EPUB 3.2 Impacting the support of EPUB 3.2 status: has PR The issue is being processed in a pull request type: spec The issue is related to a Specification update
Milestone

Comments

@baldurbjarnason
Copy link

SFNT-based fonts share application/font-sfnt as a legal media type as per IANA assignment.

This applies to .ttf and .otf font files (but not .woff files which use application/font-woff).

Promoting the use of a standard media type is obviously a better—more long-term—solution than telling people to use a vendor-specific media type like application/vnd.ms-opentype.

Currently, epubcheck gives a warning when the legal media type is used but no warning when the vendor-specific media type is used. Ideally, this should be flipped around but, in the meantime, adding application/font-sfnt as a legal media type will do.

(And, yes, the spec should be updated to reflect this).

@rdeltour
Copy link
Member

You're certainly right that standard media type are preferable, however I believe that EpubCheck should not be changed unless the list of Core Media Types from the spec is updated.

I suppose the right approach is to first create an issue in the EPUB spec issue tracker.

@baldurbjarnason
Copy link
Author

I think letting the EPUB spec override standardised and specified practice that preexists it (the media types system) is a horrible precedent to set.

Is that seriously the consensus? (Follow the EPUB spec to a tee even when it's clearly out of date and contradicts other specs and practices.) If that's the case then I'll of course close the issue.

@rdeltour
Copy link
Member

As far as I understand, EpubCheck’s goal is clearly to closely follow the spec, yes. That said, if something is obviously a bug in the spec or do not match reality, the usual approach is to issue a non-critical “warning" rather than a blocking “error”. Do you see a problem with that approach ?

I suggest we keep the issue open until a decision is made to amend the spec or not, as you filed in EPUB issue 443

@baldurbjarnason
Copy link
Author

Nope. Sounds like a plan to me. :-)

@tofi86
Copy link
Collaborator

tofi86 commented Sep 28, 2017

refs w3c/epub-specs#667

@tofi86
Copy link
Collaborator

tofi86 commented Sep 28, 2017

refs w3c/epub-specs#443

@tofi86
Copy link
Collaborator

tofi86 commented Sep 28, 2017

refs #586

@tofi86
Copy link
Collaborator

tofi86 commented Sep 28, 2017

Resolved with EPUB 3.1 spec: https://idpf.github.io/epub-cmt/v3/#cmt-grp-content-documents
Setting the "3.1 label".

Core media types for fonts are now:

Media Type Content Type Definition Applies to
application/font-sfnt [OpenType] [TrueType] OpenType and TrueType fonts. Deprecate application/vnd.ms-opentype.
application/font-woff [WOFF] WOFF fonts

However, I have now idea how this behaves with backward compatibility.

@mattgarrish mattgarrish added spec: EPUB 3.2 Impacting the support of EPUB 3.2 and removed epub-3.1 labels Nov 12, 2018
@mattgarrish
Copy link
Member

This is also related to #872. font/* media types were also added.

@mattgarrish mattgarrish added the status: accepted Ready to be further processed label Nov 13, 2018
@rdeltour rdeltour added status: has PR The issue is being processed in a pull request and removed status: accepted Ready to be further processed labels Feb 19, 2019
@rdeltour rdeltour added this to the 4.2.0-beta milestone Feb 19, 2019
rdeltour pushed a commit that referenced this issue Feb 19, 2019
Add the following media types as recognized Core Media Types for fonts:
- font/otf
- font/ttf
- font/woff
- font/woff2
- application/font-sfnt

Also add a WOFF2 declaration to the core media type test.

Fix #872, Fix #339
@rdeltour
Copy link
Member

Fixed in #972.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec: EPUB 3.2 Impacting the support of EPUB 3.2 status: has PR The issue is being processed in a pull request type: spec The issue is related to a Specification update
Projects
None yet
Development

No branches or pull requests

4 participants