[varLib] Fix pruning of HVAR

This commit is contained in:
Behdad Esfahbod 2018-02-18 21:49:39 -08:00
parent 23d373caac
commit eb6af2da72
2 changed files with 2 additions and 6 deletions

View File

@ -425,7 +425,7 @@ def _add_HVAR(font, model, master_ttfs, axisTags):
zeroes = [0]*n
for glyphName in font.getGlyphOrder():
items.append(hAdvanceDeltas.get(glyphName, zeroes))
while items and items[-1] is zeroes:
while items and not any(items[-1]):
del items[-1]
advanceMapping = None

View File

@ -43,7 +43,7 @@
</VarRegionList>
<!-- VarDataCount=1 -->
<VarData index="0">
<!-- ItemCount=18 -->
<!-- ItemCount=14 -->
<NumShorts value="1"/>
<!-- VarRegionCount=1 -->
<VarRegionIndex index="0" value="0"/>
@ -61,10 +61,6 @@
<Item index="11" value="[50]"/>
<Item index="12" value="[128]"/>
<Item index="13" value="[-18]"/>
<Item index="14" value="[0]"/>
<Item index="15" value="[0]"/>
<Item index="16" value="[0]"/>
<Item index="17" value="[0]"/>
</VarData>
</VarStore>
</HVAR>