Re: [csswg-drafts] [css-text] Clarify what ligatures are optional (#2644)

Note that HarfBuzz has since fixed the Khmer specific issue with 'clig' with https://github.com/harfbuzz/harfbuzz/commit/a95d9d8c8465ebc927bc2194dffe4ea95542e54c and https://github.com/harfbuzz/harfbuzz/commit/000d4b128eba58677acdc3b361829ff2f9a257b1 . This is sort of thing is why I explicitly added the step 6 above ("Font features of the given script which are required.") This explicitly calls out that the shaper may do whatever it thinks necessary, which I believe agrees with litherum above at https://github.com/w3c/csswg-drafts/issues/2644#issuecomment-422075536 in mentioning that "Text engines have workarounds and heuristics for broken fonts." In this case, even if the user wants 'clig' off the shaper may see that 'khmr' script is set and turn it back on anyway. In other cases this may mean that a font is detected to be broken in some way and the shaper ignores some of the requested features. Or the font may have TrueType instead of OpenType shaping and the shaper will do its best to translate the feature tags.

An alternate formulation may just be to have a step 6 (or maybe just wording in the paragraph after this list which starts "For situations where") which states something like "The user agent will take the feature requests created in previous steps into consideration when shaping." to make it obvious that the user agent should use them, but is free to override the requests if it has some special knowledge.

At tip of tree, blink now has this HarfBuzz change (so Khmer doesn't shape poorly) and is disabling common, discretionary, historical, and contextual ligatures when letter-spacing is non-zero (since everyone I asks thinks it strange to just disable common).

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

Received on Tuesday, 4 December 2018 23:43:05 UTC