Log in

View Full Version : Resolved webfonts and ie9



james438
09-07-2011, 02:51 AM
Hi,

The following allows everything but ie9 to load the tt98321 webfont.

@font-face{font-family: 'tt9832l';
src: url('tt9832l.eot');
src: local('tt9832l'), url('tt98321.woff') format('woff'),
url('tt9832l.ttf') format('truetype'),
url('tt9832l.svg') format('svg');}

The following allows the webfont to load in ie8, ie9 and Chrome, but not Firefox or Opera. Any idea on how to tweak it so that the webfont loads in all major browsers?

@font-face {
font-family: 'tt9832l';
src: url('tt9832l.eot?') format('embedded-opentype');
}

@font-face {
font-family: 'tt9832l';
url(data:font/truetype;charset=utf-8;base64,BASE64_ENCODED_DATA_HERE) format('truetype'),
url(data:font/woff;charset=utf-8;base64,BASE64_ENCODED_DATA_HERE) format('woff'),
url('tt9832l.svg#svgFontName') format('svg');
}

james438
09-07-2011, 03:59 AM
Found it.

I replaced the second code I listed above with

</style>

<!--[if IE]>
<style type="text/css">
@font-face {
font-family: 'tt9832l';
src: url('tt9832l.eot?') format('embedded-opentype');
}

@font-face {
font-family: 'tt9832l';
url(data:font/truetype;charset=utf-8;base64,BASE64_ENCODED_DATA_HERE) format('truetype'),
url(data:font/woff;charset=utf-8;base64,BASE64_ENCODED_DATA_HERE) format('woff'),
url('tt9832l.svg#svgFontName') format('svg');
}
</style>
<![endif]-->
<style type="text/css">
I wasn't aware of the browser specific commands.