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

Re: [css-inline] Summary of drop-caps/initial-letters discussion

From: Dave Cramer <dauwhe@gmail.com>
Date: Tue, 20 May 2014 17:01:26 +0900
Message-ID: <CADxXqOx0QyYOrTyZDM3berwjejwp3rmsVPdnhzpBO1vEPFo1EQ@mail.gmail.com>
To: James Clark <jjc@jclark.com>
Cc: fantasai <fantasai.lists@inkedblade.net>, "www-style@w3.org" <www-style@w3.org>
On Tue, May 20, 2014 at 4:14 PM, James Clark <jjc@jclark.com> wrote:

> I'm not clear on how this computes the sizing/alignment of the dropped
> letter. For example, if I have 10pt font size with 2pt gaps, then IIRC
> "initial letters: 3" will make something be 34pt.  What?  Neither bounding
> box nor font size will give the right alignment.

The letter needs to extend from the baseline of the third line of text to
the top of the cap-height of the first line. So the height of the initial
letter is 12pt + 12pt + Cap Height of 10pt letter. If the cap-height is 70%
of the font size, then the initial letter is ~31pt high, which would mean a
font size of ~44pt.

It does depend greatly on the particular font metrics.

> From the few examples of Arabic I've found, it seems more common to drop
> the first word rather than the first letter. OpenOffice.org drop caps
> feature has a "whole word" option which handles this.  With this proposal,
> the first word would have to be wrapped in an element to handle this, right?

Correct. I wonder if there's interest in a ::first-word pseudo-element. The
books we publish often set the first three words of each chapter in all
caps; ::first-n-word(3) would be nice ;)


Received on Tuesday, 20 May 2014 08:02:02 UTC

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