Skip to content

Instantly share code, notes, and snippets.

@wycks
Last active December 9, 2016 20:09
Show Gist options
  • Save wycks/42e88a4a6e034863584c to your computer and use it in GitHub Desktop.
Save wycks/42e88a4a6e034863584c to your computer and use it in GitHub Desktop.

Revisions

  1. wycks revised this gist Jul 4, 2014. 1 changed file with 8 additions and 1 deletion.
    9 changes: 8 additions & 1 deletion chrome-font-fix.css
    Original file line number Diff line number Diff line change
    @@ -33,4 +33,11 @@
    url('../font/larsseit.svg#LarsseitRegular') format('svg');
    font-weight: normal;
    font-style: normal;
    }
    }

    /* htaccess hack */
    <FilesMatch "\.(ttf|otf|woff)$">
    <IfModule mod_headers.c>
    Header set Access-Control-Allow-Origin "*"
    </IfModule>
    </FilesMatch>
  2. wycks revised this gist Jul 4, 2014. 1 changed file with 14 additions and 1 deletion.
    15 changes: 14 additions & 1 deletion chrome-font-fix.css
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    /*//chrome fix render svg first*/
    /* chrome fix render svg first */
    @media screen and (-webkit-min-device-pixel-ratio:0) {
    @font-face {
    font-family: 'LarsseitBold';
    @@ -20,4 +20,17 @@
    font-family: 'LarsseitThin';
    src: url('../font/test/larsseit-thin.svg') format('svg');
    }
    }

    /* for other browser just load it like so */

    @font-face {
    font-family: 'LarsseitRegular';
    src: url('../font/larsseit.eot');
    src: url('../font/larsseit.eot?#iefix') format('embedded-opentype'),
    url('../font/larsseit.woff') format('woff'),
    url('../font/larsseit.ttf') format('truetype'),
    url('../font/larsseit.svg#LarsseitRegular') format('svg');
    font-weight: normal;
    font-style: normal;
    }
  3. wycks renamed this gist Jul 4, 2014. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. wycks created this gist Jul 4, 2014.
    23 changes: 23 additions & 0 deletions chrome-font-fix
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    /*//chrome fix render svg first*/
    @media screen and (-webkit-min-device-pixel-ratio:0) {
    @font-face {
    font-family: 'LarsseitBold';
    src: url('../font/good/larsseit-bold.svg') format('svg');
    }
    @font-face {
    font-family: 'LarsseitExtraBold';
    src: url('../font/good/larsseit-extrabold.svg') format('svg');
    }
    @font-face {
    font-family: 'LarsseitMedium';
    src: url('../font/test/larsseit-medium.svg') format('svg');
    }
    @font-face {
    font-family: 'LarsseitRegular';
    src: url('../font/good/larsseit.svg') format('svg');
    }
    @font-face {
    font-family: 'LarsseitThin';
    src: url('../font/test/larsseit-thin.svg') format('svg');
    }
    }