[feaLib] make 'forceChain' an optional kwarg for barkward compat

See discussion at:
https://github.com/fonttools/fonttools/pull/1511#issuecomment-472425283
This commit is contained in:
Cosimo Lupo 2019-03-13 15:11:53 +00:00
parent 242ad6279d
commit abae80d730
2 changed files with 4 additions and 2 deletions

View File

@ -905,7 +905,9 @@ class MarkMarkPosStatement(Statement):
class MultipleSubstStatement(Statement):
def __init__(self, prefix, glyph, suffix, replacement, forceChain, location=None):
def __init__(
self, prefix, glyph, suffix, replacement, forceChain=False, location=None
):
Statement.__init__(self, location)
self.prefix, self.glyph, self.suffix = prefix, glyph, suffix
self.replacement = replacement

View File

@ -881,7 +881,7 @@ class Builder(object):
lookup.ligatures[g] = replacement
def add_multiple_subst(self, location,
prefix, glyph, suffix, replacements, forceChain):
prefix, glyph, suffix, replacements, forceChain=False):
if prefix or suffix or forceChain:
chain = self.get_lookup_(location, ChainContextSubstBuilder)
sub = self.get_chained_lookup_(location, MultipleSubstBuilder)