W3C home > Mailing lists > Public > www-style@w3.org > January 2009

Re: [Resent: Disadvantages of ch unit (was: stability of root em unit spec)]

From: Thomas Phinney <thomas.phinney@gmail.com>
Date: Fri, 9 Jan 2009 11:34:54 -0800
Message-ID: <f49ae6ac0901091134m7a5ee03n368b8d9f3179f807@mail.gmail.com>
To: "Josef Schmid" <e9427749@student.tuwien.ac.at>
Cc: www-style@w3.org

FWIW, in most (though by no means all) fonts, the digits are
monospaced, even if the font is not.

That being said, I agree that knowing the width of the zero alone,
without knowing for sure that the digits are monospaced, would seem to
be of limited value.



On Fri, Jan 9, 2009 at 9:42 AM, Josef Schmid
<e9427749@student.tuwien.ac.at> wrote:
> -------- Original-Nachricht --------
> Betreff: Disadvantages of ch unit (was: stability of root em unit spec)
> Datum: Wed, 07 Jan 2009 21:35:14 +0100
> An: www-style@w3.org
> Hi , all!
> Maybe this is discussed/mentioned before by others.
> In that case i apologize for wasting bandwidth.
> I wrote:
> [some stuff against 're', and a idea for general unit extension]
>> And instead of 'ch', 'width of "0"'.
>> (So as special case, you can write 'width of "m" from :root' ;-)
> In the spec:
> | The width of the "0" (ZERO, U+0030) glyph found in the font for the
> | font size used to render. If the "0" glyph is not found in the font,
> | the average character width may be used.
> At first) the 'average char width' can be far from the width of "0".
> Depending of the used font and the capabilities of the browser,
> this can produce very different results.
> (For chinese fonts this is typically near factor 2).
> At second)
> Depending of the language and the font used.
> The width of "0" say nothing about the average char width.
> Even not about the average digit width.
> In the case you know the factor (for example kanji & fullwidth chars),
> this is cumbersome. (U+FF10)
> But for most you don't know.
> If you need it only for digits, than for languages with own digit
> glyphs it does not help.
> (Even in the case of western language, you have often medial digits
>  (U+1D7E2??) and mathematically monospaced digits (U+1D7F6) also.)
> I thing the simplest solution is to allow the web developer to specify
> the char.
> Also useful is the possibility of width from a string.
> So i like to propose:
>  * width of <string>, where string is in single or double quotes.
>  * height of <string>
> In both case it is the needed spaced, and the value depend on
> block-progression, font-size, and other font properties.
> I know units with spaces and variable parts are new in CSS,
> but i think if we want such units like ch & rem, than
> the expressiveness should be extend. (Not doing the same fault
> as PHP, which ended up with ~20 different sort keywords.*)
>> Sorry for my bad English [, again].
> jm2c,
>  Jos (btw. What you think about 'e0' as unit name? ;-) ef
> ad *) Sorry, hopefully i don't start a programming language
>      flame war.
Received on Sunday, 11 January 2009 09:15:48 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 11 February 2015 12:34:21 UTC