You might be able to use Modernizr . It adds classes to the <html>
element, which represents the functions supported by the browser. In this case, the class that it adds to support @font-face
, fontface
.
What I would do is set the header size to what works well for the alternate font, and then attach the correct font size, for example:
.title { font-size: 20px; font-family: arial, sans-serif; } .fontface .title { font-size: 50px; font-family: 'alternative-font', arial, sans-serif; }
Although, even then I think that this may not change in the correct order ... Actually, I will not worry about the layout looking funny at boot time, but I hope this helps.
source share