Skip to content

Instantly share code, notes, and snippets.

@awestmoreland
Created August 8, 2013 07:18
Show Gist options
  • Save awestmoreland/6182292 to your computer and use it in GitHub Desktop.
Save awestmoreland/6182292 to your computer and use it in GitHub Desktop.
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