Open Pomax opened 7 years ago
@davelab6 isn't it time to just do this? it sucks to have to jump through more hoops just to meet the standard and this is an official google repo
Chiming in: I just followed these steps to self-host the material-UI font in a new project.
The instructions still indicate woff/woff2
and eot
files, but the indicated directory (in the steps) only contains ttf
, otf
, and .codepoints
files. Probably the wrong place for this but --
Gotta say, those isntructions are still pretty weird: literally every browser that supports ttf also supports woff, there is literally no reason to double up, and MS really, really killed off IE 6-8, so still including eot
is literally just wasting everyone's time and efforts. Finally, a font-face declaration should almost certainly never include a local()
, because the whole point of the font-face is that you know the user will get the correct font, so that they get to interact with the interface you designed, not through "whatever happens to be lying around that has a naming conflict".
Given that material-design-icons targets modern systems, not IE8 on windows XP, there are a few formats that no longer make any sense as part of the CSS delivery.
eot
is no longer supported, and was only necessary for IE4 through IE8, which are not targets for material design, and have in fact all been discontinued by Microsoft. MS now only officially supports IE11 and EDGE, both of which support WOFF. (there is an exception for Vista SP2 users which are forcing MS to support IE9 only for them until 2018)svg
is not even a legal format anymore in modern browsers: it was so bad that we took the very idea back out of the SVG 2.0 specification, and all browser manufacturers have actively removed support for this format again. The only browser that still supports this format also supports WOFF. (note: this is not the same as OpenType 1.7+ compliant fonts with an SVG table for the outline data. Those are still Opentype fonts, and drastically different from "SVG fonts" as defined in SVG 1.1)ttf
/otf
these are system fonts, subject to full OpenType validation. To serve these online, you wrap them in WOFF, which lets you do basic delivery optimization thanks to table-based compression, but offers further optimization by letting you safely remove parts that are meaningless in web context, and are only necesary for passing OpenType validation. Webfonts don't need to be full universal system fonts, they just need to pass webfont validation.The only sensible format in 2017 for all currently supported browsers is WOFF (and the further optimized WOFF2). The other formats are literally redundant. Adding them in addition to WOFF offers no benefit, but increases complexity, bundle sizes, load times, and wastes bandwidth. And bad cases might lead to worse rendering (looking at you, SVG1.1 fonts).
Let's move the web forward.