ignore lsb, just use 0xFFFF for sparse advance
This commit is contained in:
parent
48ae9cbf1c
commit
b73969b2ff
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user