Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Geoff Evason's method of embedding base64-encoded web fonts into CSS file to circumvent CORS in Firefox. http://geoff.evason.name/2010/05/03/cross-domain-workaround-for-font-face-and-firefox https://github.com/geoffevason
@font-face {
font-family: 'MyFontFamily';
src: url('myfont-webfont.eot?') format('embedded-opentype');
}
@font-face {
font-family: 'MyFontFamily';
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('myfont-webfont.svg#svgFontName') format('svg');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.