Skip to content

Instantly share code, notes, and snippets.

@redesigned
Created June 18, 2013 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save redesigned/5805834 to your computer and use it in GitHub Desktop.
Save redesigned/5805834 to your computer and use it in GitHub Desktop.
WebFont CSS Deceleration (cross browser w/ local install or cached file preference) Note: #iefix line only needed for older versions of IE.
#Allow Cross Domain Fonts
<FilesMatch "\.(ttf|ttc|otf|eot|woff|svg)$">
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>
</FilesMatch>
@font-face {
font-family: 'FontName';
src: local('FontName'); /* Local and Cache */
src: url('/fontdirectory/fontfilename.eot'); /* IE9 Compat Modes */
src: url('/fontdirectory/fontfilename.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('/fontdirectory/fontfilename.woff') format('woff'), /* Modern Browsers */
url('/fontdirectory/fontfilename.ttf') format('truetype'), /* Safari, Android, iOS */
url('/fontdirectory/fontfilename.otf') format('opentype'), /* Some Modern Browsers */
url('/fontdirectory/fontfilename.svg') format('svg'); /* Legacy iOS, others */
font-weight: normal;
font-style: normal;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment