Font Face
Current Version: 0.2
This extension supports the transformation of a format-agmostic font declaration:
@font-face { font-family: 'Comfortaa'; font-weight: normal; src: url('fonts/Comfortaa_Regular');}
into one that follows Paul Irish's Bulletproof @font-face
syntax and that's based on what files have been uploaded to the specified location with the same base filename:
@font-face { font-family: 'Comfortaa'; font-weight: normal; src: url('fonts/Comfortaa_Regular.eot'); src: local('Comfortaa'), url('fonts/Comfortaa_Regular.ttf') format('truetype'), url('fonts/Comfortaa_Regular.otf') format('opentype'), url('fonts/Comfortaa_Regular.svg#mysvgid') format('svg');}
This extension currently supports checks for the following formats:
- Embedded OpenType (.eot)
- OpenType (.otf)
- Scalable Vector Graphics (.svg)1
- TrueType (.ttf)
-
If you plan to offer SVG font support, add a
svg_id
to the eCSStender’smethods
. Thissvg_id
will be automatically appended to all SVG font URLs:eCSStender.addMethod('svg_id','mysvgid');