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

@fantasai Thanks! I was hoping this would be a compromise proposal between the complexities of paragraph shaping in programs like InDesign and what we have on the web.

The current algorithm as I understand it looks at the remaining space left on a line and divides that evenly between the words or characters depending on if `inter-word` or `inter-character` is chosen.

This proposal is around that same algorithm that identifies remaining space on a line, but directs what proportion of that remaining space goes between words or between characters, or to font stretch (details in next paragraph).

The third value for font-stretch is the more complicated one as knowing how much font-stretch to apply is not straightforward. As such this part can probably be removed from the initial implementation and added at a later time. If this part of the proposal were implemented, I would expect that if the font were already stretched to its limit then the remainder of the space would be allocated between words in characters at the ratio of the other two numbers, so if you had `text-justify: 0 0 1` and font-stretch wasn’t available, the remainder of the space would be placed equally between both the words and characters.

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


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

Received on Thursday, 19 January 2023 21:30:11 UTC