W3C home > Mailing lists > Public > www-style@w3.org > March 2018

Re: Hanging Punctuation Questions

From: fantasai <fantasai.lists@inkedblade.net>
Date: Mon, 5 Mar 2018 17:28:51 +0900
To: David Hyatt <hyatt@apple.com>, www-style list <www-style@w3.org>
Cc: John Hudson <tiro@tiro.com>
Message-ID: <8208286f-1242-e333-4008-1b91c1c65d4a@inkedblade.net>
On 09/25/2016 07:28 AM, fantasai wrote:
> On 03/04/2016 10:39 PM, David Hyatt wrote:
>> I have begun implementing hanging punctuation in WebKit. So far the
>> “first” and “last” values are supported, and “allow-end/force-end”
>> are coming soon. I had a few questions after implementing:
>> (1) Can you only hang one character? That’s what I did, but if
>> there’s a run of characters all in the Ps category should I be
>> hanging them all when hanging-punctuation is “first” or just a
>> single one? (Similar question for “last”.) In my research of
>> typography examples, I do see situations where - for example -
>> a period and quote mark together both get hung.
> The spec currently says
>      “At most one punctuation character may hang at each edge of the line.”
> and for CJK typesetting this is a correct requirement.
> Western typesetting is a bit more complicated because we sometimes
> kern punctuation together, such as your quote-mark + period example,
> which frequently results in a kerned pair.
> So a question would be, if we hang the full unkerned advance width
> of the hung punctuation, would that be sufficient to address this
> case? Or does the full advance of both characters need to hang
> regardless of kerning?
>> (4) How to handle kerning, e.g., for hanging-punctuation:first,
>> if I hang an opening quote mark, the next letter may also be offset
>> to the left, since it pushes into the quotation mark. Should kerning
>> simply be turned off when you hang punctuation between the hung
>> punctuation and the following glyph?
> My guess is you subtract the amount of kerning from the amount of hang
> so the character adjacent to the hanging one is aligned according to
> its side bearing. However, we should probably check with people who
> know better. :)

FWIW, CSSWG discussed this in
and concluded that it didn't know for sure what to do, so the interaction
of kerning and hanging-punctuation is now marked as undefined.

If anyone has further insights on this, let us know, maybe we'll define
it in Level 4. :)

Received on Monday, 5 March 2018 08:29:32 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:15:06 UTC