[whatwg] size attribute

Kristof Zelechovski giecrilj at stegny.2a.pl
Tue Apr 28 07:00:14 PDT 2009

The algorithm [1] for converting a character width to pixels is good indeed,
except that it should be formulated in terms of glyphs and not characters
because stand-alone characters are not displayed or perceived as such for
some scripts.

If the primary font for which the algorithm is being run comprises several
scripts, as it typically does, characters of the script of the effective
language of the control should take overwhelming weight in the average.

This algorithm does not fulfill the requirements for the size attribute
formulated in section [2]: when it is applied, it may happen that
the user agent will not be able to allow the user to see the whole text it
should be able to allow.  The requirement should be modified to match the
effect of the algorithm.


[1] <URL:
[2] <URL:

More information about the whatwg mailing list