Re: [css-text] Amending hanging-punctuation for Western typography

On 4/1/16, 3:19 PM, "jonlee@apple.com on behalf of Jon Lee" <jonlee@apple.com> wrote:

>
>> On Apr 1, 2016, at 2:00 PM, Jan Tosovsky <j.tosovsky@email.cz> wrote:
>> 
>> On 2016-04-01 Jon Lee wrote:
>>> 
>>> Inspired by the options available in Illustrator [7] ...
>>> the proposal expands the “hanging-punctuation” property:
>>> 
>>> hanging-punctuation: none | [ <mode> <character-set> , ]* <mode>
>>> <character-set>
>>> 
>>> 2. <character-set> specifies how a punctuation mark hangs relative to
>>> its line box. The marks are grouped into sets.
>>> 
>>> “latin-primary” characters hang fully outside of the line box. It
>>> includes the following characters:
>>>  - Single straight quote, double straight quote, comma, full stop
>>>  - Unicode Pd that is a hyphen (the spirit of this is to include
>>>     characters that would be used to break a word)
>>>  - Unicode Pf, Pi
>>> 
>>> “latin-secondary” characters hang 50% outside of the line box. It
>>> includes the following characters:
>>>  - Asterisks, tildes, ellipses, colons, semicolons
>>>  - Unicode Pd not included in “latin-primary” (em dashes and 
>>>     the like)
>> 
>> Overall a nice attempt. I am just worried those values '100% and 50% outside' are too rough. In ConTeXt typesetting engine both left and right values are specified and they are apparently less coarse.
>
>They may not be as fine grained, but it seems good enough for Illustrator, and based on examples I’ve seen on the web appears to be good enough for what web authors want. I’d also worry that the specific values you cite were tailored for the fonts most used by ConTeXt, where the Illustrator options appear to be the best compromise for the wide variety of fonts used by novice graphic designers (I imagine the experts would tweak everything).
>
>That said, if this were to be later expanded to allow for finer-grained tweaking, then one could imagine an “auto” value representing the best values the UA can provide (which could include your suggested values or even text-engine-driven optical alignment), whereas what I’m proposing is a “simple” value that all UA’s could at least implement and provide a consistent result to the web author.

I like the overall recasting of the hanging-punctuation property, particularly adding start. But I agree with Jan that the 100/50 split is problematic. I expect its use in Illustrator is mainly a first-pass, fix-problems-manually sort of thing. I’m not sure there are a good set of values (even if taken down to the character level as ConTeXt does) that will work for all ‘latin’ scripts in all fonts, etc. So if we go this route there might be a long line of asks for things like latin-germanic, latin-emoji, latin-primary-80%, etc. to accommodate various design styles.

Currently the spec says that hanging means the punctuation mark is not considered for fit, alignment or justification. What if we amended that to say that *some portion of the width* of the punctuation mark is not considered? Then we could give some coarse recommendations for particular scripts that would key off the content language rather than being enumerated in the CSS value. This wouldn’t solve the problem of some people wanting a 100% hang versus others wanting a 80% hang for the same character, but it would be a way of getting to the 50%/100% split you proposed without adding more CSS syntax.

I also have a concern that the list format allows too many combinations that wouldn’t be usable in practice. I think the order of mode importance trick is pretty slick, but it seems like a source of confusion to me.

Elika, Koji - what do you think?

Thanks,

Alan

Received on Wednesday, 6 April 2016 23:33:56 UTC