I have a page that is using a non-standard font and arial as a fail safe. Does anyone know if there is a way to set the font-size conditionally to the font?
<style type='text/css'> body { font-family: Calibri, arial, sans-serif; font-size: 1em, .9em, .9em; /* Where 1em would be for Calibri and .9 would be for arial and sans-serif */ } </style>
Good question but currently you can’t do this until the ‘font-size-adjust’ property is more widely supported. It normalises fonts that have very different native sizes. This is the simplest definition and example I could find:
http://www.w3schools.com/CSS/pr_font_font-size-adjust.asp
I’d say there’s no harm in using it even now and then it’ll be ready when browser support improves.