W3C home > Mailing lists > Public > www-style@w3.org > September 2013

]css-writing-modes] An approach to implementing arbitrary markup in text-combine-horizontal

From: Stephen Zilles <szilles@adobe.com>
Date: Fri, 13 Sep 2013 00:48:46 -0700
To: "www-style@w3.org list (www-style@w3.org)" <www-style@w3.org>
Message-ID: <CE2F61DA5FA23945A4EA99A212B15795721E4EF413@nambx03.corp.adobe.com>
There is a discussion of restricting what the content of an element with text-combine-horizontal can be. This is suggested because it may make the implementation of feature simpler (and thus see it realized sooner).

Below is a suggestion for a dumb but simple implementation of T-C-H that does not restrict the content. This approach is based on noting that what must be done for T-C-H is almost the same as what must be done for a max-content sized float. There are, however, a few things that are different.

First, it is necessary to turn off "emphasis" inheritance on entry to the "float". If the "float" itself specified "emphasis" that should be honored with the emphasis being of the horizontal kind. Second, depending on the number of glyphs to present, the correct font variant to select half width glyphs (for 2 glyph strings) or third width glyphs (for longer strings) should be turn on.

It also seems that sometimes some extra kerning of the glyphs (to compress the string width) is done. This would need to be specified in a script independent way.[There may be other special processing required of the "float" of which I am unaware.]

When the "float" is formatted, its size is measured. If the size is less than or equal to 1 em or compression is off, the float is centered in the em box as if it were a character. If compression is on and If the size is greater than 1 em the float is scaled to make it 1 em in size (in all the dimensions in which it exceeds 1 em) and then centered in the em box. The result behaves as if it were a single character.

I do understand that using a float per T-C-H may not be very efficient. So, user agents may choose to special case simple cases such as single contiguous strings of text. That, of course, does not invalidate the general strategy. It just means that we do not need to restrict the content of a T-C-H to enable the special cases.

Steve Zilles
Received on Friday, 13 September 2013 07:49:11 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:32 UTC