Re: 'en' unit (Was: '%%' unit (plus 'en' unit))

> [Original Message]
> From: Ian Hickson <ian@hixie.ch>
>
>
> On Sun, 9 May 2004, Sean M. Hall AKA Dante wrote:
> >
> > I propose an 'en' unit. 1en = the width of an 'n' character in that
> > element's font type. If CSS has an em unit it should logically also have
> > an en unit.
>
> Some fonts don't have "n"s. We did consider a "ch" unit (indeed Mozilla
> supports it) to mean "average character advance width" but there were
> difficulties in defining the property in the context of proportional
> fonts. It also causes issues when mixing different ideographic text (which
> is generally fixed width) with latin text (which is not), since the
> average advance width of the two script types is quite different, leading
> to the average being pretty useless.

Why not take advantage of the East Asian Width property in Unicode?
If a character has an EAW of W or F, count it as being a two ch wide
character since it is a full-width character, and if it has an EAW of N, Na,
or H count it as being a  one ch wide character.  The problem of how to
treat characters with an Ambiguous EAW would probably be solvable
by comparing them with the ideographic characters. Still not perfect,
but it would provide a better starting place IMO.

Received on Monday, 10 May 2004 12:01:52 UTC