Re: [csswg-drafts] [css-text] Clarify what ligatures are optional

I think what could be workable is for https://www.w3.org/TR/css-fonts-3/#feature-precedence to look more like

1. Font features enabled by default, including features ~~required~~ ~~for~~ ~~a~~ **of the** given script.
2. If the font is defined via an `@font-face` rule, the font features implied by the font-feature-settings descriptor in the `@font-face` rule.
3. Font features implied by the value of the ‘font-variant’ property, the related ‘font-variant’ subproperties and any other CSS property that uses OpenType features (e.g. the ‘font-kerning’ property).
4. Feature settings determined by properties other than ‘font-variant’ or ‘font-feature-settings’. For example, setting a non-default value for the ‘letter-spacing’ property disables ~~common~~ **optional** ligatures **(e.g. common, discretionary, and historical ligatures)**.
5. Font features implied by the value of ‘font-feature-settings’ property.
6. **Font features of the given script which are required.**

This clarifies the effect of letter-spacing and gives the script features marked as required the highest priority which fixes the Khmer issue.

I do wish that point 5 and 6 here could be swapped for a more ideal solution with ‘font-feature-settings’ property being able to override script required features. In practice it seems most shaping libraries enforce required script features no matter which other feature requests are made (I'd need to check DirectWrite and CoreText for their behavior here, but it appears that font features enabled or disabled by the script is already in practice being done at highest priority for all shapers except HarfBuzz). Being able to swap 5 and 6 is, I think, the current point of contention on the HarfBuzz issue. As a result (and I'm not sure how the wording of the specification could handle this) the order of points 5 and 6 may need to be flipped or non-normative in order to reach agreement.

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

Received on Thursday, 8 November 2018 17:25:46 UTC