[featureVars] Remove unused argument
This commit is contained in:
parent
5b96fff9ce
commit
6a13bdc2e6
@ -14,9 +14,7 @@ from collections import OrderedDict
|
|||||||
from .errors import VarLibError, VarLibValidationError
|
from .errors import VarLibError, VarLibValidationError
|
||||||
|
|
||||||
|
|
||||||
def addFeatureVariations(
|
def addFeatureVariations(font, conditionalSubstitutions, featureTag="rvrn"):
|
||||||
font, conditionalSubstitutions, featureTag="rvrn", processLast=None
|
|
||||||
):
|
|
||||||
"""Add conditional substitutions to a Variable Font.
|
"""Add conditional substitutions to a Variable Font.
|
||||||
|
|
||||||
The `conditionalSubstitutions` argument is a list of (Region, Substitutions)
|
The `conditionalSubstitutions` argument is a list of (Region, Substitutions)
|
||||||
@ -47,8 +45,7 @@ def addFeatureVariations(
|
|||||||
# >>> f.save(dstPath)
|
# >>> f.save(dstPath)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if processLast is None:
|
processLast = featureTag != "rvrn"
|
||||||
processLast = featureTag != "rvrn"
|
|
||||||
|
|
||||||
_checkSubstitutionGlyphsExist(
|
_checkSubstitutionGlyphsExist(
|
||||||
glyphNames=set(font.getGlyphOrder()),
|
glyphNames=set(font.getGlyphOrder()),
|
||||||
@ -78,9 +75,7 @@ def addFeatureVariations(
|
|||||||
(conditionSet, [lookupMap[s] for s in substitutions])
|
(conditionSet, [lookupMap[s] for s in substitutions])
|
||||||
)
|
)
|
||||||
|
|
||||||
addFeatureVariationsRaw(
|
addFeatureVariationsRaw(font, font["GSUB"].table, conditionsAndLookups, featureTag)
|
||||||
font, font["GSUB"].table, conditionsAndLookups, featureTag, processLast
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def _checkSubstitutionGlyphsExist(glyphNames, substitutions):
|
def _checkSubstitutionGlyphsExist(glyphNames, substitutions):
|
||||||
@ -325,14 +320,11 @@ def cleanupBox(box):
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
def addFeatureVariationsRaw(
|
def addFeatureVariationsRaw(font, table, conditionalSubstitutions, featureTag="rvrn"):
|
||||||
font, table, conditionalSubstitutions, featureTag="rvrn", processLast=None
|
|
||||||
):
|
|
||||||
"""Low level implementation of addFeatureVariations that directly
|
"""Low level implementation of addFeatureVariations that directly
|
||||||
models the possibilities of the FeatureVariations table."""
|
models the possibilities of the FeatureVariations table."""
|
||||||
|
|
||||||
if processLast is None:
|
processLast = featureTag != "rvrn"
|
||||||
processLast = featureTag != "rvrn"
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# if there is no <featureTag> feature:
|
# if there is no <featureTag> feature:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user