W3C home > Mailing lists > Public > www-style@w3.org > October 2011

Cap heights

From: Brad Kemper <brad.kemper@gmail.com>
Date: Wed, 26 Oct 2011 18:18:42 -0700
Message-Id: <1E0B7DE5-4949-46A4-A02D-A05001057FFA@gmail.com>
Cc: "www-style@w3.org" <www-style@w3.org>
To: fantasai <fantasai.lists@inkedblade.net>
On Oct 26, 2011, at 1:55 PM, fantasai <fantasai.lists@inkedblade.net> wrote:

> fantasai: Question is add or don't add; should be similar to ex-height to
>            define
>  <Rossen> How is this going to impact the line height itelf?
>  Florian: What about Japanese text?
>  dbaron: The use case is fitting something on the baseline to be the size
>          of the letters
>  sylvaing: what kind of use case?
>  szilles: introducing new glyphs, e.g. for math
>  Florian: Not sure introducing one unit will be enough to solve the problem
>  TabAtkins: For Japanese, em-height should do it. For lowercase letters,
>             ex-height will do it
>  sylvaing: Is this common? Do people like Brad have to do this often and
>            have to hack it?

The short answer to that is "no" for me, although I'm interested in the capability

The hack for raster images is pretty simple though: size/crop the image to the planned cap height before saving it, give it a smallish independant line-height in CSS, and hope that the text is not resized separately from the graphics. That would likely be good enough for a lot of uses (obviously not perfect). I think it would get more useful for vector images though, so that you could easily put them in whatever text you want, and have them adapt to the size and font family, without pixelating side effects. 

I'm not sure if we should have a unit though, or some sort of 'fit-cap' value for height maybe. Most of the time, the only number to attach to the unit would be "1", no? Except maybe to make the curves of the smiley face extend beyond the baseline and cap-height line a bit, as an uppercase "O" might. 
Received on Thursday, 27 October 2011 01:19:20 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:06 UTC