Posted By

ertbor on 02/05/11


css typography

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


Bulletproof @Font-Face Syntax

 / Published in: CSS


The find and replace regular expressions convert from Font Squirrel's generated @font-face.

  1. Find:
  2. src: url\('(.*?)'\);
  3. src: local\('☺'\), url\('(.*?)'\) format\('woff'\), url\('(.*?)'\) format\('truetype'\), url\('(.*?)'\) format\('svg'\);
  5. Replace:
  6. src: url('$1#') format('embedded-opentype'),
  7. url('$2') format('woff'),
  8. url('$3') format('truetype'),
  9. url('$4') format('svg') ;

Report this snippet  

You need to login to post a comment.