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

Re: [css-inline] Updated WD of CSS Inline Layout

From: Charles Lamont <charles@gateho.gotadsl.co.uk>
Date: Tue, 22 Sep 2015 21:56:25 +0100
To: www-style@w3.org
Message-ID: <5601C079.9070406@gateho.gotadsl.co.uk>
On 2015-09-22 16:15, Dave Cramer wrote:
> On Thu, Sep 17, 2015 at 9:09 PM, Charles Lamont <
> charles@gateho.gotadsl.co.uk> wrote:
>> On the 'initial-letter' property, I have previously made the case of
>> wishing to give the flavour of journeyman letterpress printing, in which
>> 'suboptimal alignment' may actually be a desired effect.
>> I imagined few printers had type founts that exactly spanned the height
>> of two-lines-of-text-plus-one-thickness-of-leading. So for two lines of
>> 10-on-12pt text the ideal would be somewhere around 22pt, but the
>> printer would only have had 18 and 24pt founts to chose the drop cap
>> from. The 18pt character would have the same baseline as the second line
>> of text, so its cap height would be below the cap height of the first line.
> Let me try to understand your use case a little better. Does the resulting
> font size of the initial letter need to be some common integer value,
> exactly as if you only had a finite number of available sizes of metal
> type? In your example, the font size for a three-line drop cap that aligns
> properly would be around 42pt (for Adobe Caslon, anyway). If we assume the
> hypothetical print shop had only 36pt and 48pt type available, would you
> then want to use 36pt as the actual type size of the initial letter? And so
> you would first have to calculate the size of the properly-aligned 3-line
> drop cap, find the nearest available value, and then calculate the scaling
> factor (36/42 * 3 = 2.57) so a 2.57-line initial letter?

You have the general idea, but the method you suggest is probably too
much to ask for a relatively unusual use case. I was not thinking of
actually calculating an exact size, and the draft does pretty much what
I am looking for as it stands, but see below.

>> This case would appear to be approximated to by, for example
>> 'initial-letter: 2.75 3'. I suggest this possibility would be made more
>> evident if in one of the examples a non-integer <number> were employed for
>> the
>> first argument.
> I'm reluctant to create such an example, as the motivation for this feature
> was to make it possible to easily create properly-aligned initial letters.
> We try not to add unnecessary restrictions to the specs, and are happy to
> see creative use made of this freedom. I don't think this use case will be
> common, however.

I understand and agree with the primary motivation, but suggest the
working draft concentrates on the original purpose a little too
single-mindedly. I think that altering one of the section 2.3 sunken or
raised letter examples to a non-integer size would benefit reader
understanding by illustrating a more general case, without creating
confusion or additional complication.

>> Section 2.5 shows the calculation for an aligned drop initial (i.e. with
>> equal size and sink). What would be the calculation when the arguments
>> are not equal?
> The actual font size for a 2.75-line drop cap should be 2.75/3 times the
> result for a 3-line drop cap.

That is as I supposed. Again, I suggest it would be more complete if the
formula showed the general case where the size and drop are not equal.
The spec should try to avoid leaving things to supposition.

>> If 'initial letter' could additionally take some more direct sizing
>> argument, such as a percentage of the surrounding text size, the case
>> would be better met and the "tricky" sizing calculation could in that
>> instance be avoided.
> This sounds like a different use case. Do you have a motivation for needing
> an initial letter that is, for example, 350% of the surrounding text? We
> are discussing other sizing options [1] but having more use cases would be
> really helpful.

This is just an idea for an easier way of achieving much the same effect
as specifying a non-integer size.

> I'm not sure how the "tricky" sizing calculation in your original example
> could be avoided. You could easily get a visual "not quite aligned" effect
> with initial-letter: 2.75 3 without having to do any calculation. But if it
> must be 2.57 and not 2.75, then it's hard to see how a simple sizing option
> in the spec could help.

For the "not quite aligned" case I agree.

Calculating the exact discrete 'metal type' size of 2.57 lines would be
a luxury (probably an unaffordable one).

I was suggesting that any calculation of the font size of the initial
letter would be rendered unnecessary (for this use case) if one had the
option to just specify it. I was giving the example of using a
percentage of the surrounding text size as a possible means of doing so.
One might have {initial-letter: 350% 4;} or {initial-letter: 36pt 2;} as
well as {initial-letter: 2.75 3;}.

>> Negative size values are not allowed. Is it OK that the size might be zero?
> You can set the size to zero, but your readers may not like it :)

Again, as I thought. Could have been fun if 'initial-letter' were
animatable, though.

> Thanks,
> Dave
> [1] https://lists.w3.org/Archives/Public/www-style/2015Sep/0096.html

Charles Lamont
Received on Tuesday, 22 September 2015 20:57:00 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:57 UTC