Bulletproof @Font-Face Syntax


/ Published in: CSS
Save to your folder(s)

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


Copy this code and paste it in your HTML
  1. Find:
  2. src: url\('(.*?)'\);
  3. src: local\('☺'\), url\('(.*?)'\) format\('woff'\), url\('(.*?)'\) format\('truetype'\), url\('(.*?)'\) format\('svg'\);
  4.  
  5. Replace:
  6. src: url('$1#') format('embedded-opentype'),
  7. url('$2') format('woff'),
  8. url('$3') format('truetype'),
  9. url('$4') format('svg') ;

URL: http://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.