Re: [csswg-drafts] [css-text] Enable finer control over text-justify (#7738)

There are 3 things we need to control here to make justified text look great.

1. **Hyphenation control** book design software usually lets you dial in how liberal it gets with hyphenation, better spacing vs fewer hyphens.
2. **Whitespace control** where a designer can allocate how excess space per line is allocated (between words, letters, or stretching character forms)
3. **Text wrapping** allocating what words fall on various lines

This issue addresses item 2 in this list. While `text-wrap: balance` is very exciting for designers, I’m skeptical `text-wrap: pretty` is going to solve the issues of whitespace, unless I am mistaken (please point out if I am!), `text-wrap` doesn’t change if extra space is placed between words or between letters.

For context, here is the equivalent to what I am proposing here in InDesign. These aren’t considered “magic numbers” but carefully define how whitespace behaves in text. I think InDesign’s implementation is both complicated from an authoring standpoint and likely less performant from an implementation standpoint so I tried to create a more simplified version with just one value for word spacing, one value for letter spacing, and one value for glyph scaling, as opposed to 3 values for each.
<img width="414" alt="Screenshot 2023-06-20 at 3 09 58 PM" src="https://github.com/w3c/csswg-drafts/assets/377189/46caf917-f82f-45b9-a274-25faa4102d4f">

I am not married to the proposal above, but I would love to solve the issue of whitespace shaping in justified text blocks.

-- 
GitHub Notification of comment by scottkellum
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7738#issuecomment-1599646536 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 20 June 2023 22:17:05 UTC