[css-values][css-writing-modes] ch and ic units

Here's a set of interrelated issues. We discussed them at Sydney, but I think half the discussion happened during a break, and we did not reach (or record) a conclusion.

1) We should have a unit (tentatively called 'ic' for ideographic character), which should be defined similarly to the 'ch' unit, except that it measures the size of the typical ideographic character:

  ic unit
    Equal to the used advance measure of the "水" (U+6C34)
    glyph found in the font used to render it. In the cases
    where it is impossible or impractical to determine the
    measure of the "水" glyph, a value of 1em must be assumed.

2) "advance measure", as used in the definition of both the ch and ic units isn't defined, and we need to clarify how it works in vertical writing modes. Since they are typically used to set the inline size of something in terms of a number of characters, it would makes sense to me in
- in "writing-mode:sideways-*" or "writing-mode:vertical-*;"text-orientation:sideways", advance measure for both units means advance width
- in text-orientation:upright, advance measure for both units means advance height
- in text-orientation:mixed, ch should use the advance width, which ic should use the advance height.

Quick tests (http://jsbin.com/fuqagij/edit?html,css,output) show that
- Safari and Firefox almost do this (except they put mixed with upright)
- Chrome always uses the advance width
- IE/Edge used adavance width in mixed mode, and as far as I know does not support the other text-orientations.

3) If we pick the suggested definition for advance measure, we should probably amend the definition of the ch unit, so that with  "writing-mode:sideways-*" or "writing-mode:vertical-*;"text-orientation:sideways" and if it is impossible or impractical to determine the measure of the "0" glyph, the fallback should be 1em rather than 0.5em.

 - Florian

Received on Sunday, 6 March 2016 10:01:19 UTC