- From: Sergey Malkin via GitHub <sysbot+gh@w3.org>
- Date: Mon, 02 Jul 2018 18:54:25 +0000
- To: public-css-archive@w3.org
My few cents about why turning off ligatures automatically is not a good idea: * Even for "simple scripts" this will be a problem. Switching off ligatures or contextual ligatures may change shaping results to look completely different. I don't want this to happen with even tiny spacing added. * Situation is much worse when rule is applied to highly contextual complex scripts like Arabic. Section 8.2.1 of the spec even shows that Arabic requires special treatment where kashida should be used to increase inter-character space, and this will be * My understanding of intent of turning off features is to prevent uneven spacing, when some glyphs are ligated and some not. But other shaping features can also be degraded sufficiently by spacing, for example cursive attachment or contextual shaping. Which means we don't actually know what features to disable. Ligature is obvious if font is "regular Latin font", but contextual alternates or stylistic sets will degrade significantly. Some stylistic sets are innocent and some are not, there is no way to know which ones. * There may be threshold after which features can be turned on or off. IIRC, apps tried to apply heuristics to disable ligatures. InDesign turned them off when spacing was set to at least either 1/4em or 1/10em (I don't remember exactly). But this was very long time ago, when InDesign didn't support complex scripts or contextual alternates. They essentially knew what types of fonts they are dealing with, this is not true anymore. * There are only few ways for how spacing can be introduced. * Inter-character justification, which is mostly applied to East Asian scripts. Ligatures or contextual shaping are rare between ideographs, so turning features on or off doesn't have much effect on shaping results anyway. * Arabic justification. This case doesn't require turning features off, it will insert kashidas or use justification alternates into already shaped text. * Another is explicit letter-spacing, but in this case I would expect web designer to know how much spacing is added, what font is used, what features are applied (and which ones are safer to use with spacing), and what scripts will be present. This means this is very likely that decision can be made based by designers and there is no much need for layout engine to make this decision for them. * Finally, there are problems with how this rule is defined in the spec. First, I would expect rule to be not applied when spacing is applied to space character. Second, should ligatures be turned off only for two glyphs around additional space or whole text run? Should features be switched off for all text runs on the line, including ones using different font? How about inline blocks? -- GitHub Notification of comment by SergeyMalkin Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2644#issuecomment-401900372 using your GitHub account
Received on Monday, 2 July 2018 18:54:32 UTC