Mobile app version of vmapp.org
Login or Join
Megan663

: How to Conditionally Load @Font-Faces via CSS3? Curerntly, when you use a beautiful font, like for example the multiligual Calibri fotn (a win7 font), then it even downloads eventhough a user

@Megan663

Posted in: #Css #Css3 #Embed #Fonts #Html

Curerntly, when you use a beautiful font, like for example the multiligual Calibri fotn (a win7 font), then it even downloads eventhough a user has the font already installed, when i use the following css:
@charset "utf-8"; @font -face {
font-family: Calibri;
src: url('http://blabla.com/calibri.eot')
}


However: this font is 400 kb gzipped, and i would like it to ONLY download, if the font is NOT present or installed by that name / family name, right?

Question: Is this possible to setup a neat conditional rule for this, for modern browsers (say IE8+, Firefox 3+ etc). How to implement it? Thanks for any and all clues!

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Megan663

1 Comments

Sorted by latest first Latest Oldest Best

 

@YK1175434

You can do it like this:
@font -face {
font-family: Calibri;
src:
local('Calibri'),
url('http://blabla.com/calibri.eot');
}


Source and more detailed explanation.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme