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

As to the original issue with Noto Khmer, at https://github.com/harfbuzz/harfbuzz/issues/1310#issuecomment-432796833 it is confirmed that this is just an oddity of the specification and HarfBuzz. The 'clig' feature is normally an optional feature which should be turned off when letter spacing, but the OpenType shaping spec states that it is required for the Khmer 'khmr' script. HarfBuzz was written around the idea that the user can always force off any feature, even if that results in broken shaping. These two concepts conflict when trying to disable 'clig' just for letter spacing, so either users of HarfBuzz or HarfBuzz itself will need to take this into account. It seems rather unreasonable for every user of HarfBuzz to need to know about this, so HarfBuzz will probably need to be updated to handle this case somehow. This also explains why this particular issue may not be seen with other shapers (CoreText and DirectWrite) since they may already not allow disabling 'required' features. So a possible resolution to the Firefox issue may just be to point at this HarfBuzz issue.

As to Fraktur, there is actually a very good test for that at http://unifraktur.sourceforge.net/testcases/ligature_quirks/ which should probably be adapted in some way into the wpt project. As far as I know, OpenType does not assign a language or script tag for Fraktur for shaping purposes (there is 'PDC ' but it doesn't seem to have separate rules) and Unicode treats it as a Latin script, so it is up to the font to do any required shaping. Since there are no special rules around 'clig' for Fraktur, fonts which support it generally use 'ccmp' for required shaping of 'tz', 'ch', 'ck' and 'liga' for optional ligatures like 'tt'. If a Fraktur font used a feature other than 'ccmp' for these it's just buggy, even 'rlig' is noted as only applying to horizontal text, and Fraktur wants this applied even when laid out vertically.

I would still like some explicit resolution on whether letter-spacing (or just letter spacing) should affect 'dlig' and 'hlig' in the context of resolving features in css.

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

Received on Thursday, 25 October 2018 15:32:48 UTC