Accept old version of HVAR XML

21cbab8ce9 (commitcomment-27649836)
This commit is contained in:
Behdad Esfahbod 2018-02-20 17:42:49 -08:00
parent 2cc182ce58
commit 38a0ffb815

View File

@ -610,7 +610,10 @@ class VarIdxMap(BaseTable):
if mapping is None:
mapping = {}
self.mapping = mapping
glyph = attrs['glyph']
try:
glyph = attrs['glyph']
except: # https://github.com/fonttools/fonttools/commit/21cbab8ce9ded3356fef3745122da64dcaf314e9#commitcomment-27649836
glyph = font.getGlyphOrder()[attrs['index']]
outer = safeEval(attrs['outer'])
inner = safeEval(attrs['inner'])
assert inner <= 0xFFFF