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

Update font media types #77

Closed
alrra opened this issue May 30, 2017 · 13 comments
Closed

Update font media types #77

alrra opened this issue May 30, 2017 · 13 comments
Assignees

Comments

@alrra
Copy link
Contributor

alrra commented May 30, 2017

The font top-level media type has been registered, so the new media types for font files are as follows:

Font format Media type
collection font/collection
otf font/otf
sfnt font/sfnt
ttf font/ttf
woff font/woff
woff2 font/woff2

See also: https://www.iana.org/assignments/media-types/media-types.xhtml#font


@dougwilson I did run the fetch-iana script but it doesn't seem to get these updates. Let me know if you are open to updating custom.json.

@sholladay
Copy link

This would be a nice change as it is simpler and more intuitive. I am curious about browser support.

@alrra
Copy link
Contributor Author

alrra commented Jul 21, 2017

I am curious about browser support.

@sholladay I responded to a now deleted tweet about that.

TL;DR: browsers ignore font media types.

@dougwilson
Copy link
Contributor

TL;DR: browsers ignore font media types.

Is that all browsers or only current browsers? I'd be interesting to know about current Firefox, current Firefox ESR, current Chrome, current Safari, current Edge, current IE, IE10 (probably IE9, but no lower since I think SSL is broken now on those anyway). Anything else @sholladay you would like to know about?

@sholladay
Copy link

I only personally care about latest of: Chrome, Firefox, Safari, Edge

FYI Microsoft dropped support for IE < 11 early last year and they are no longer even remotely secure, as they stopped receiving basic security patches. IE11 has approximately 13% market share and falling quickly. It is a new day!

I know the situation with fonts on mobile has traditionally been very different than desktop (e.g. for a while only SVG was supported). It wouldn't surprise me if they avoided sniffing to save battery. That is probably a bigger concern. But following the standard is a 👍 from me.

@alrra
Copy link
Contributor Author

alrra commented Jul 21, 2017

Is that all browsers or only current browsers?

@dougwilson The only problem was with old Blink/WebKit based browsers, which used to display a warning, but that is no longer the case.

@dougwilson
Copy link
Contributor

I wonder when Apache / NGINX will update their mappings to use these new types. I'm going to see if there are bug reports in those projects. That's where our font types are coming from today, if you were wondering :)

@alrra
Copy link
Contributor Author

alrra commented Aug 7, 2017

I'm going to see if there are bug reports in those projects.

@dougwilson Did you manage to look into that? Thanks!

Also, in the meantime,

Let me know if you are open to updating custom.json.

@dougwilson
Copy link
Contributor

Hi @alrra I didn't check yet. I can take a look now. I would prefer this remain simply an aggregation system, as in it just passes through the other sources, so unless there is some specific reason (like types that came into existence before IANA and similar, as one example) I would rather not add things to custom.json . Our font data comes from the Apache / NGINX projects currently, so updating those projects will mean we'll pull down the new mappings.

@dougwilson
Copy link
Contributor

A quick search didn't find anything in the Apache HTTPD bug tracker, but found https://trac.nginx.org/nginx/ticket/1243 for NGINX.

@dougwilson dougwilson self-assigned this Aug 8, 2017
alrra added a commit to webhintio/hint that referenced this issue Aug 15, 2017
The `content-type` rule uses `mime-db` which currently doesn't¹
contain the standard² font media types.

This commit fixes that by introducing code that overwrites the
non-standard font media types with the standard ones.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

¹ jshttp/mime-db#77
² https://www.iana.org/assignments/media-types/media-types.xhtml#font

Close #425
@dougwilson
Copy link
Contributor

@alrra you're welcome to make a pull request to get the types added, though that will just list the existing extensions twice until the upstream removes them.

@alrra alrra mentioned this issue Aug 28, 2017
@alrra
Copy link
Contributor Author

alrra commented Aug 28, 2017

you're welcome to make a pull request to get the types added,

Done.

though that will just list the existing extensions twice until the upstream removes them.

:(

@dougwilson
Copy link
Contributor

Alright, Apache changed their types now, which makes landing this fit very nicely now :O

@alrra
Copy link
Contributor Author

alrra commented Oct 11, 2017

Alright, Apache changed their types now, which makes landing this fit very nicely now :O

@dougwilson I've updated #90.

molant pushed a commit to webhintio/hint that referenced this issue Oct 16, 2017
`mime-db` now includes¹ the appropriate font media types, thus,
there is no longer a need to overwrite² the font media types.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

¹ jshttp/mime-db#90
  jshttp/mime-db#77

² e35b778
alrra added a commit to webhintio/hint that referenced this issue Oct 26, 2017
`mime-db` now includes¹ the appropriate font media types, thus,
there is no longer a need to overwrite² the font media types.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

¹ jshttp/mime-db#90
  jshttp/mime-db#77
  https://github.com/jshttp/mime-db/releases/tag/v1.31.0

² e35b778

Close #581
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