Jukka K. Korpela wrote:
> The results are consistent with those I got with my simplistic > method that > compares the letter x in large font size with a stickyard. See > http://www.cs.tut.fi/~jkorpela/x-height.html > Thanks for this ! Together with Bruno's script, that makes for 2 usable tools to find out the aspect ratio of fonts. > > It seems that different ways lead to the same results, implying > that the > figures mentioned in CSS specifications are wrong - most notably when > they say that Verdana has an aspect ratio of 0.58, but it actually > has 0.545. > I've no idea where that value for Verdana comes from, all tests and comments I've found point to a value of 0.54x~0.55. One additional note: Gecko doesn't use the 3rd digit after the period, and tends to round upwards (e.g for Verdana it will use 0.55). Or perhaps the info provided by the font itself only takes two digits. For practical purposes, this will only have an impact at very high font-sizes. > This, as well as methods of finding out the x-height value for > specific > fonts, is of some importance to authors who wish to use font-size- > adjust > (which helps on Firefox 2 and does no harm when it doesn't). > As I've noted before (and you did as well), using font-size-adjust does improve readability of text in the case where different fonts are used in the same text block. It also helps in case the fallback font is smaller than the one chosen by the stylesheet author. Progressive enhancement at work here. Lori Lay wrote: > I don't think you can rely on the size of elements dimensioned in ex > units. Eric says in his book that many user agents get their value > for > ex by taking the value of em and dividing it in half. This is because > most fonts don't have the value of their x-height built-in, and it's > difficult to compute, as you discovered. Since lowercase letters are > about half as tall as uppercase letters, user agents assume that > 1ex is > equal to .5em. > Safari and Gecko handle the ex value correctly [1]. A 10em wide block won't have the same width as a 20ex wide block, given the same font. basic test: <http://dev.l-c-n.com/_temp/em_ex.php> [1] when used for line-height, I get different results between the 2 browsers, but that is more related with rounding to grid pixels. Philippe --- Philippe Wittenbergh <http://emps.l-c-n.com> ______________________________________________________________________ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d IE7 information -- http://css-discuss.incutio.com/?page=IE7 List wiki/FAQ -- http://css-discuss.incutio.com/ Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
