Re: [css-text][css-conditional] language specific support for hyphenation and justification

On 6/16/15, 5:24 AM, "Florian Rivoal" <florian@rivoal.net> wrote:

>...
>Problem 1 would be addressed if we added something like
>  @supports hyphenation-language(fr) {...}
>but it seems awfully specific and narrow.
>
>...

>We could generalize a little bit, and go with something like (to be
>bikesheded):
>  @supports nice-justification(fr) {...}
>where the condition evaluates to true if one of the following is true:
>- The language should use hyphenation and the browser has the necessary
>resources to do it
>- The language should use some other approach (kashida, etc) and the
>browser knows how to do at least one of the acceptable techniques
>- The language is known not to need any language-specific algorithm or
>resource to justify well
>
>This is broader than @supports hyphenation-language(), but not by a whole
>lot, and it deciding which languages need what may be quite
>controversial, so I am not sure that's a great idea either.
>
>Any idea on how to solve this well?

While hyphenation is often necessary for nice justification, it isn’t the
only thing that can contribute. There are also features that browsers
don’t support yet like min/max word spacing and multi-line justification
algorithms. Using nice-justification for just the list above would be
premature, I think.

Since hyphenation-language would be checked on a language-specific basis,
couldn’t you just omit the check for languages that don’t need hyphenation
for justification? I’m not sure what should be done for the kashida case,
though.

Thanks,

Alan

Received on Tuesday, 16 June 2015 13:30:11 UTC