W3C home > Mailing lists > Public > www-style@w3.org > July 2014

[css-inline][css-initial-letters] Some issues with Initial Letters and a suggestion as to how to fix them

From: Stephen Zilles <szilles@adobe.com>
Date: Mon, 7 Jul 2014 20:18:14 +0000
To: "www-style@w3.org list (www-style@w3.org)" <www-style@w3.org>
Message-ID: <744a58e0ea39422c99c28c442634a509@BN1PR02MB183.namprd02.prod.outlook.com>
At the Seoul CSS meeting there was a draft of a proposal on how to handle initial letters sketched out. This proposals said that there would be a property with two values: (1) the height (in lines) of the Initial Letter sequence and (2) the number of lines that would be shortened by this Initial Letter sequence, with the second value defaulting to equal the first value. So, the value "4 3" would have an initial Letter sequence that is 4 lines high and would rise one line above the paragraph it begins and would shorten the first three lines of the paragraph. Setting this property to something other than "1" would create an Initial Letter sequence from the string to which it applies. This works OK for typical Latin script and culture usage, but does not seem to work well with typical usage in other scripts and cultures. There seems to have been a presumption that (latin) baseline of the Initial Letter sequence would align with the last baseline of the lines that were shortened.

For example [1], in Japanese the Initial Letter sequence is normally centered in the area that the sequence shortens. In Arabic [2], there seems to be a tendency to do Initial Words rather than letters. And, in Japanese, there are cut-ins (blocks of text, perhaps rotated) that are handled similarly to Arabic words. Both tend to be centered in the area that is shortened by the sequence. In Northern Indic scripts [3], those with a Hanging baseline, the alignment is not at all to the last line of the set of shortened lines, but, instead to the Hanging baseline of the first line. (I suspect that it is uncommon in such Indic scripts to have the Initial Letter sequence rise above the first line of the paragraph.

This suggests that, in addition to specifying how high the Initial Letter Sequence is and how many lines it shortnes, there needs to be a way of specifying how the Initial Letter sequence aligns. The alignments desired for Arabic, Japanese and Indic scripts are very similar to the alignments defined in the "Box-Align" [4] module.

To see this, consider (1) the Initial Letter sequence and (2) the set of lines shortened by this sequence to be two "alignment subjects" [4] in an (virtual) alignment container [4].  For example,

TTTTT his is an example that
  T   has three shortened lines
  T   and an Initial Letter
sequence that has a 3 line high
"T". That is both the "T" height
And the lines shortened is 3 lines.

In this example, The (virtual) alignment container would surround the "T" and the top three lines, the first alignment subject would be the "T" and the second alignment subject would be the three lines of text that begin "his is ..." and end with "... Initial Letter".

Or, in other words, the set of shortened lines is one alignment subject  (the lines of which is aligned using the normal inline formatting context mechanisms) and the other alignment subject is the Initial Letter sequence. That Initial Letter sequence would then be aligned to the set of shortened lines, either by centering (as for Japanese and Arabic), by the alignment to the last-baseline (for Latin scripts) or to the first baseline (for Northern Indic scripts). This would be done using the "align-self" property on the Initial Letter sequence and would allow the author to specify the desired alignment with respect to the shortened lines. That is, the "align-self" property would be applicable to an Initial Letter sequence. In addition, it would be useful if the "auto" value of "align-self", when applied to an Initial Letter sequence, was script sensitive and defaulted to the typical behavior for the script in use in the Initial Letter sequence.

There are a few more details that would need to be worked out. If the Initial Letter sequence rises above the shortened lines (if the second number is smaller than that first), then it is clear what alignment to the last line means, but it is not so clear what the other values (first line or center) should mean.

Steve Zilles

[1] http://lists.w3.org/Archives/Public/www-archive/2014Jul/0004.html
[2] http://lists.w3.org/Archives/Public/www-archive/2014Jul/0003.html
[3] http://lists.w3.org/Archives/Public/www-archive/2014Jul/0002.html
[4] http://dev.w3.org/csswg/css-align/
Received on Monday, 7 July 2014 20:36:05 UTC

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