diff --git a/Lib/fontTools/varLib/__init__.py b/Lib/fontTools/varLib/__init__.py index 22e244112..b130d5b2a 100644 --- a/Lib/fontTools/varLib/__init__.py +++ b/Lib/fontTools/varLib/__init__.py @@ -563,17 +563,17 @@ def _get_advance_metrics( ): vhAdvanceDeltasAndSupports = {} vOrigDeltasAndSupports = {} - # HACK: we treat width 65535 and lsb 0 as sentinel values to signal that a glyph + # HACK: we treat width 65535 as a sentinel value to signal that a glyph # from a non-default master should not participate in computing {H,V}VAR, # as if it were missing. Allows to variate other glyph-related data independently # from glyph metrics - sparse_metrics = (0xFFFF, 0) + sparse_advance = 0xFFFF for glyph in glyphOrder: vhAdvances = [ metrics[glyph][0] - if glyph in metrics and metrics[glyph] != sparse_metrics + if glyph in metrics and metrics[glyph][0] != sparse_advance else None - for i, metrics in enumerate(advMetricses) + for metrics in advMetricses ] vhAdvanceDeltasAndSupports[glyph] = masterModel.getDeltasAndSupports( vhAdvances, round=round