@font-face: a little tricky business
On the surface, web fonts are pretty easy, but in reality, they get complicated when we want them to work in all modern browsers. Some browsers use OTF, others use WOFF, and some use EOT, RTF, and SVG. Let's go over the full setup for making a web font work using the @font-face
property.
Making it work in all browsers
If we wanted to make this work in all browsers in the most optimal fashion, we need to provide quite a bit extra. Here's a snippet from the popular blog, CSS Tricks, that describes the ideal @font-face
at-rule. (Using @font-face by Chris Coyier of CSS-tricks.com, August 25, 2016, https://css-tricks.com/snippets/css/using-font-face/.)
@font-face { font-family: 'MyWebFont'; src: url('webfont.eot'); /* IE9 Compat Modes */ src: url('webfont.eot?#iefix') format('embedded- opentype'), /* IE6- IE8 */ url('webfont.woff2') format('woff2'), /* Super Modern Browsers */ url('webfont.woff') format('woff'), /* Pretty Modern Browsers...