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: Dave Singer <singer@apple.com>
Date: Mon, 12 Jan 2009 11:23:30 -0800
Message-Id: <p0624082ac59148ffc6fc@[]>
To: Thomas Phinney <thomas.phinney@gmail.com>, Josef Schmid <e9427749@student.tuwien.ac.at>
Cc: www-style@w3.org

At 11:34  -0800 9/01/09, Thomas Phinney wrote:
>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.

off the top of my head

perhaps it should be defined to be "the monospaced digit width, if 
there are both digits and they are monospaced, else 0"?

>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.

David Singer
Multimedia Standards, Apple Inc.
Received on Monday, 12 January 2009 19:26:09 UTC

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