- From: fantasai <fantasai.lists@inkedblade.net>
- Date: Sat, 24 Sep 2016 18:28:58 -0400
- To: David Hyatt <hyatt@apple.com>, www-style list <www-style@w3.org>
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? > (2) Normal quotation marks don’t belong to Ps/Pe/Pf/Pi. Not an > issue necessarily but figured I’d bring that up in case it’s an > oversight that those can’t be hung. Definitely an oversight. I'll add them to the list... surprised they aren't in either Pf or Pi! > (3) allow-end/force-end doesn’t include hyphens. In my research >of hanging punctuation, I found typographic examples of hanging >punctuation where hyphens hang at the end of lines of justified >text. I wonder if this should be an additional value to the >property. It’s unclear to me if people want this capability or >not, but I figured I’d mention it since I found examples of it. Yes, I figured hyphens might need to be added to handle Western hanging punctuation. However since the all requirements of Western hanging punctuation weren't clear enough to design a feature that handled it well, and CJK hanging-punctuation was both more critical and sufficiently well-defined I didn't quite tackle the Western requirements in this level. (As far as I'm aware, CJK doesn't hang hyphens.) See also discussion at http://www.w3.org/Mail/flatten/index?subject=Amending+hanging-punctuation+for+Western+typography&list=www-style > (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. :) > (5) “Non-zero inline-axis borders or padding between a hangable mark > and the edge of the line prevent the mark from hanging.” I would > include margins also, i.e., any “spacer” introduced by inlines should > turn off hanging. This was discussed in https://www.w3.org/mid/20140724012940.490F.C598BCD7@antenna.co.jp and the conclusion was to only consider borders and padding. > (6) The WG resolved overflow is ink overflow. I think it should be >scrollable overflow. I can elaborate on this if needed, but it’s a > selectable character that has to be reachable when edited and > cut/copied etc. Any designer is going to leave space for hanging > punctuation if they turn it on, so fears of scrollbars are unfounded > IMO. It’s also an annoying amount of additional work to treat that > as ink overflow when the common sense implementation just moves the > line box (and line boxes are scrollable overflow obviously). This >is similar to text-indent, which creates layout overflow when > negative, so it’s not clear to me why hanging punctuation can’t >behave the same way. > > Regardless of ink vs. layout, the designer has to leave space for >hanging punctuation if they decide to use this feature, so I would > prefer we go with the more common sense implementation choice. Your logic makes sense to me. I will reraise the issue with the CSSWG (along with the rest). ~fantasai
Received on Saturday, 24 September 2016 22:30:26 UTC