Re:Show HN: The List
by JacksonGariety on Tuesday January 29, 2013 @04:35PM
(#5136459)
We decided to go with .woff on the font cause it's the trendy, cross-browser thing to do. We now know Windows won't anti-alias .woff files. In the next commit I'll add fallback to .ttf or .otf for Windows machines.
[ Parent
| on HN ]
Re:Show HN: The List
by thaumaturgy on Tuesday January 29, 2013 @06:16PM
(#5137051)
Oh! Oh! This is something I actually know something about! So, if you're willing to use something like FontSquirrel (http://www.fontsquirrel.com/fontface/generator) to convert a single font file into four different formats, and if you're willing to store all four formats on your site, then you can fix your font problem by loading the .eot version of it first in your stylesheet, followed by a "?". Like so:
@font-face {
font-family: 'Crimson Text';
src: url('/style/v6/fonts/crimsontext-regular.eot?') format('embedded-opentype'),
url('/style/v6/fonts/crimsontext-regular.woff') format('woff'),
url('/style/v6/fonts/crimsontext-regular.ttf') format('truetype'),
url('/style/v6/fonts/crimsontext-regular.svg#svgFontName') format('svg');
}
The browsers I've tested on so far will only load the file they're interested in, so it doesn't add much overhead in requests.There's a breakdown of the hows & whys of this method at http://www.fontspring.com/blog/the-new-bulletproof-font-face...; I think that's the most current method in use. It seems to work well.