Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
font-patcher: Do not destroy ligs or SS
[why] When a certain 'higher codepoint' glyph is needed for a substitution or ligature rule of a basic glyph and we replace the 'higher codepoint' glyph with a symbol that stylistic set or ligature will be broken. [how] We can not determine if a certain glyph is the _target_ of a pos-sub rule (at least I could not find a way). What we do is remove all pos-sub entries that _start_ at a symbol-patched glyph [1], but that is not the same. Instead of walking through all substitution tables we just examine the 'basic glyphs' and also protect all glyphs that they reference through most of the possub tables. In fact I encountered only "Substitution" entries and never "Ligature" entries, but we handle both alike. "Pair", "AltSub", and "MultSub" are not handled, but could be added if need be. [1] ryanoasis#711 Fixes: ryanoasis#901 Reported-by: Xiangyu Zhu <[email protected]> Signed-off-by: Fini Jastrow <[email protected]>
- Loading branch information