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

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

From: Dave Cramer <dauwhe@gmail.com>
Date: Thu, 24 Jul 2014 16:19:58 -0400
Message-ID: <CADxXqOyDqzxGPq1jB-9uJehit2+wBaVszCvcZ7hr1uxKucsckA@mail.gmail.com>
To: Stephen Zilles <szilles@adobe.com>
Cc: "www-style@w3.org list (www-style@w3.org)" <www-style@w3.org>
On Mon, Jul 7, 2014 at 4:18 PM, Stephen Zilles <szilles@adobe.com> wrote:

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

Steve, I really appreciate those links. I've been having trouble finding
examples online.

I've been working with the Japanese example, although I've been hindered by
my complete lack of knowledge of Japanese or Japanese typesetting. :)  It
appears to me that the size of the drop initial is such that it extends (in
the inline direction) from the start-end of the first line to the end-edge
of the Nth line, so the width of the character is N character widths +
(N-1) line gaps.

I've put an example in the ED; I'm hoping somebody who knows what should
happen will tell me what I did wrong :)


>
>
> This suggests that, in addition to specifying how high the Initial Letter
> Sequence is and how many lines it shortens, 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”.
>

Latin scripts may be trickier than the others in this case, since the cap
height is the top alignment point for both alignment subjects.

For Japanese (in vertical writing mode), it appears that the top of the
characters align (or could it be the top of the character frame?). There
wouldn't be a bottom alignment point in vertical writing (?) as the size
has already been determined by the character width.


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

I've added an initial-letter-align property to the editor's draft of the
CSS Line Layout Module. As you suggest, the auto value should recognize the
document language, and apply the appropriate alignment to the initial
letter. I'm not sure how many values we'll need, but right now I've
included auto | alphabetic | hanging | ideographic.


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

In those cases (partially or fully "raised" caps) we determine the initial
letter size as if it was fully sunken, based on the script's alignment
requirements. Then we ignore the before alignment point, and set the after
alignment point as usual.

I know we have a long way to go for this to work properly for all scripts.
Thanks so much!

Dave


> [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 Thursday, 24 July 2014 20:20:26 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:23 UTC