Merge pull request #2067 from simoncozens/fealib-debug-subclassable
Only stash lookup location if buildLookups_ has cooperated
This commit is contained in:
commit
10413d947a
@ -30,6 +30,7 @@ from fontTools.otlLib.error import OpenTypeLibError
|
|||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
import itertools
|
import itertools
|
||||||
import logging
|
import logging
|
||||||
|
import warnings
|
||||||
|
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
@ -707,9 +708,13 @@ class Builder(object):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
for ix in lookup_indices:
|
for ix in lookup_indices:
|
||||||
self.lookup_locations[tag][str(ix)] = self.lookup_locations[tag][
|
try:
|
||||||
str(ix)
|
self.lookup_locations[tag][str(ix)] = self.lookup_locations[tag][
|
||||||
]._replace(feature=key)
|
str(ix)
|
||||||
|
]._replace(feature=key)
|
||||||
|
except KeyError:
|
||||||
|
warnings.warn("feaLib.Builder subclass needs upgrading to "
|
||||||
|
"stash debug information. See fonttools#2065.")
|
||||||
|
|
||||||
feature_key = (feature_tag, lookup_indices)
|
feature_key = (feature_tag, lookup_indices)
|
||||||
feature_index = feature_indices.get(feature_key)
|
feature_index = feature_indices.get(feature_key)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user