14
0
mirror of https://github.com/belluzj/fantasque-sans.git synced 2024-12-22 07:21:31 +01:00

Fixes bug in potentially cyclic ligatures

* fixes issue #133
This commit is contained in:
John Mager 2020-06-21 03:31:23 +00:00
parent bb0e4dc3af
commit 2508b90ce9

View File

@ -53,6 +53,12 @@ def rule(liga):
ignore(head=liga[0], suffix=(liga[1:] + [liga[-1]])),
]
# careful with repeats:
# #133 ->->->->, /**/**/**/, etc.
if len(liga) > 2 and liga[0] == liga[-1]:
rules.append(ignore([liga[-2]], liga[0], liga[1:]))
rules.append(ignore(head=liga[0], suffix=(liga[1:] + [liga[1]])))
# hardcoded ignores, i.e. `<||>`
rules.extend(ignores[tuple(liga)])