Re: [csswg-drafts] [css-text] For most languages, hyphens:auto should not hyphenate Capitalized words (#3927)

> Look at the hyphenation of "Dokument-Zeicensatz" to see what I mean. It happens to work out in the title,

The title uses `hyphens: none` in its CSS. If you disable that rule, and make it sufficiently narrow, you can get a result like

>    Do-
>    ku-
>    ment-
>    Zei-
>    chen-
>    satz

but I'm not sure that browsers (or authors) should be too concerned about optimizing for such extreme cases.

> It's a well-meaning rule (to avoid two different kinds of hyphen in the same compound) but you'd never tolerate the effect in a book. So why in a browser.

When you're typesetting a book, you have the luxury of making individual decisions for the specific layout (font, text size, line width, etc) that you're producing. So you can decide whether it's preferable to split

>  ... Dokument-
>  Zeichensatz ...

at the explicit hyphen, preserving each component intact but perhaps leaving the line that ends "Dokument-" a bit short, or to hyphenate one of the components, e.g. resulting in

>  ... Dokument-Zei-
>  chensatz ...

in order to more precisely fill the lines. And you don't have to worry that the reader will suddenly zoom the text (or resize the page) such that only a dozen characters fit on each line.

For a browser that has to dynamically lay out the text, I don't think it's easy to say, in general, which is better; it'll depend on the relative weight given to various subjective factors, and the appropriate balance is likely to be different for very narrow columns than for more "normal" page sizes.

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


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

Received on Friday, 22 April 2022 11:21:33 UTC