jaydenseric / Barebones

A barebones boilerplate for getting started on a bespoke front end.
125 stars 6 forks source link

support for more font format #6

Closed easonzhuyi closed 9 years ago

easonzhuyi commented 9 years ago

The template just generate only woff base64 code in scss file. How to define the template that make it support for more font format and generate svg ttf eot base64 in scss file? Thanks

jaydenseric commented 9 years ago

This is deliberate, WOFF is the only format you need to use these days. Can I Use will show Opera Mini to be a problem at 5.35% global market share, but it really isn't a concern unless you are marketing to the poorest parts of Africa. In Australia the market share is 0.09%. Barebones is IE9+, if you have to support IE8 then you will need to handle the fonts manually.

WOFF 2.0 is really nice but poorly supported. As you would still need to include the older format, Base64 embedding both would not be a good idea. HTTP/2 is upon us, and it handles seperate requests realy well. I am considering dropping the special workflow for Base64 embedding in favour of simple @font-face declarations referencing separately cachable WOFF 2.0 and fallback WOFF assets.