W3C home > Mailing lists > Public > www-style@w3.org > August 2010

Re: Feedback on hyphenation properties

From: Simon Fraser <smfr@me.com>
Date: Thu, 05 Aug 2010 12:12:14 -0700
Cc: "www-style@w3.org list" <www-style@w3.org>
Message-id: <31C393BA-08BC-4B20-A025-884CFAFC6C7D@me.com>
To: Christoph Päper <christoph.paeper@crissov.de>
On Aug 5, 2010, at 10:07 AM, Christoph Päper wrote:

> Simon Fraser:
> 
>> We have reviewed the hyphenation-related properties in the GCPM module
> 
> Is it relevant whom “we” includes bedsides yourself?

I work for Apple.

>> Do we really need both "hyphenate-before" and "hyphenate-after" properties,
>> or would a single "hyphenation-min-fragment-length" property suffice?
> 
> In <http://lists.w3.org/Archives/Public/www-style/2010Jun/0253.html> I suggested <length> as an optional value type for these properties, but now I believe it should be the sole value type. That would require to introduce the ‘ch’ unit and it being a <length>.

Using a Length value here would give different behavior. hyphenate-before/hyphenate-after count characters. The "ch" unit is the based on the width of the "0" character, so words with lots of narrow characters would split at different places to those with wide characters.

As far as I know, the publishing industry limits hyphenation based on counting characters, not on measuring lengths.

> In MS Word the only (length) variable a user can alter is the ‘hyphenation zone’ which is the maximum “amount of space to leave between the end of the last word in a line and the right margin” (which doesn’t make much sense in justified or RtoL paragraphs).

This is third way to control hyphenation, and one not addressed by any of the proposed properties. We should decide if this is widely-used enough to reflect in a CSS property.

> I think “push” and “remain”, like Håkon quoted from XSL, are better to understand than “before” and “after”, but ‘hyphenation-remain-character-count’ and ‘…-push-…’ are too long, though very self-descriptive.
> 
> Since only minimums are interesting here and “min” usually comes paired with “max”, “limit” seems the better alternative (or it could be left out altogether).
> 
>        … stands for “s”, “ate”, “ation” or whatever
> 
>  hyphen…-limit-remain: 4ch; /* remainder on first line, excluding(?) ‘hyphen…-char’ */
>  hyphen…-limit-push:   3ch; /* pushed to second line */
>  hyphen…-limit-length: 8ch; /* minimum word length to consider breaking at all */
>  /* in this example 5ch+3ch and 4ch+4ch are effective minimums */
> 
> “-limit” should actually come at the end (linguistic-wise), but I think ‘hyphen…-limit” would be a useful shorthand property.
> 
>  hyphen…-limit: 8ch 4ch 3ch;   /* word, remain, push */
>  hyphen…-limit: 8ch 4ch;       /* word, remain; push = remain */
>  hyphen…-limit: 8ch;           /* word; remain = push = word / 2
>                   or: remain = ceil(word/2), push = floor(word/2) */

"limit" works for me, but "push"/"remain" seem obscure. How about:

hyphenate-start-limit:
hyphenate-end-limit:

or

hyphenate-prefix-limit:
hyphenate-suffix-limit:
?

>> "hyphenate-lines" also doesn't convey its purpose very well.
> 
> For consecutive broken lines only a maximum makes sense to specify. “0” would effectively turn off hyphenation even at literal hyphens, whereas “none” means no limit, i.e. infinity. 
> I dislike unitless numbers, so I suggest to also introduce the unit ‘ln’ which would usually give the current (default) line height but in this case acts more like a number (similar to ‘ch’ for character width).
> 
>  hyphen…-limit-consecut…: 3ln; /* maximum number of consecutive broken lines */
>  hyphen…-limit: 8ch, 3ln;      /* word, lines; note the comma */

I don't see the need to introduce units here. It's a count.

> 
>> Finally "hyphenate-character"
> 
> By the way, are there orthographies where the pushed part (instead or additionally) is preceded by a string?
> 
> PS: Most users would be happy with any automatic hyphenation at all.

Agreed.

Simon
Received on Thursday, 5 August 2010 19:12:52 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:30 GMT