Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Getting .TTF fonts to work in IE

EDIT: Solved

1 Answer

Zoltán Holik
Zoltán Holik
3,401 Points

For IE you need to use .eot font format, so you need to convert your ttf file to eot, with a converter like http://www.fontsquirrel.com/ webfont generator.

For Cross-browser compatibility use all the font formats not just ttf.

@font-face {
    font-family: 'Some Font';
    src: url('fonts/some-font.eot');
    src: url('fonts/some-font.eot?#iefix') format('eot'),
         url('fonts/some-font.woff') format('woff'),
         url('fonts/some-font.ttf') format('truetype'),
         url('fonts/some-font.svg') format('svg');
    font-weight: normal;
    font-style: normal;
}

And for some Chrome font rendering issue, the best solution is to put the svg format at the first position, because in that case the you get the best font rendering result.

Thanks again Zoltan. I'll give this a go.

When I downloaded the two fonts used on the site, they only came with a .TTF file. Usually they come with more than that on fontsquirrell I didn't know I could convert it to the other formats.