J
Jukka K. Korpela
2012-09-10 2:36 said:It is not like you can fork:
Got Verdana?
Then body { font-size: 80%; }
else
body { font-size: 100%; }
Cannot do this in CSS
Ehem, in a sense, you can... The font-size-adjust property was designed
(largely) for reasons like this. It was present in CSS 2.0, dropped from
CSS 2.1, now resurrecting in CSS3 - as even more abstract:
file:///C:/Users/Jukka/Documents/CSS3/font-size-adjust.html
It's a bit tricky conceptually, and implementations have issues. If you set
font-size-adjust: 0.545
(using a value that appears to be the x-height ratio of Verdana
according to the most reliable studies [like mine]), then a browser
should behave so that text in Verdana is not affected and text in other
fonts gets size-adjusted (normally upwards) with a factor determined by
their x-height rations.
But among commonly used browsers, only Firefox supports
font-size-adjust. And using the code above, it size-adjusts Verdana,
too, so it probably has a wrong idea of its x-height. Worse still, it
adjusts it downwards.
My suspicions were confirmed when I look at
https://developer.mozilla.org/en-US/docs/CSS/font-size-adjust
where the value of 0.58 is used (it was mentioned as an example in the
CSS 2.0 spec, and it is simply wrong).
So in a sense you can. Allow 8 years for browsers to catch up (including
the fix to Firefox, which might be the hardest part).