[thelist] Font-Size-Adjust was [OT: Font Recommendation?]

pandy pandion at gmx.net
Sat Oct 22 22:31:17 CDT 2005

Gunlaug Sørtun wrote:
>No, I don't think you are missing anything, rather that I (and others)
>haven't got our "facts" right.

I'm glad. Not for the sake of being right, but I was seriously fearing I 
was hallucinating. As you say, this is such a nice property to have. :-)

>...and some internal tests I made myself a while ago, clearly show that
>Moz/FF is doing 'something' with that property.

OK, I'm getting scared now... but blasphemous as it feels, I really think 
Eric's test is wrong. He uses the values 1, 2 and 0.75 and, if I understand 
the test right, expects the rendered font size to be equal to, double and 
3/4 of the declared font size. Correction, the third line is supposed to be 
9 pixels. Where does that come from? Lost me there. Anyway, the value for 
font-size-adjust isn't a factor that is to be multiplied with the declared 
size. It's a fixed value, the aspect value (font size/x-height) of the 
preferred font.

Maybe it has to do with the little math example in the spec. But that shows 
how the *browser* should calculate the final font size from the font-size 
and aspect value of the preferred font (given by us) and the aspect value 
of the font that will actually be used (the browser looks that up somehow). 
In the case of Verdana the spec says the aspect value is 0.58. Porter 
Glendinning thinks it 0.55, or as he says, "closer to 0.546 or so".

If we, using Eric's example, assume that the substitute serif font will be 
Times New Roman, a font-size-adjust value of about 0.92, not 2, would make 
the text 28 pixels. The spec says Times New Roman has an aspect value of 
0.46 (if that's right). Lets do the math.

According to the spec the browser does this calculation.

y(a/a') = c

y = 'font-size' of first-choice font
a = aspect value of fist-choice font
a' = aspect value of available font
c = 'font-size' to apply to available font

Which gives

I doubt there is a font with an aspect value of 0.92, but that's beside the 
point. :-)

>Anything is better than the spread we have now, so 'exactness' isn't a
>major issue - to me at least.

Exactly. I have a poor sense for typography and don't see small differences 
at all. Before that discussion on css-d years ago, I hadn't even noticed 
that with the given value for Verdana the substitute font gets too large. 
The way I did it, and still do if I occasional use this property, is by 
trial and error. If I don't know the aspect value of my preferred font I 
simply play around with the value until a font that's very different looks 
about the same size. It may not be perfect but it's better, not worse!

>and would like to know where I can find more correct
>information about support and usage

Afraid I don't have any other links than those we have mentioned already. 
Except maybe this one. Bugzilla seems to be down, but it's a bug report for 
lack of support on (I think) Linux. IIRC it's clear from the discussion the 
property is supported on Windows.


More information about the thelist mailing list