Fix hhea/vhea compile with metrics tables
This commit is contained in:
parent
d11e7d98e8
commit
03cf8fc157
@ -46,8 +46,9 @@ class table__h_h_e_a(DefaultTable.DefaultTable):
|
||||
return sstruct.pack(hheaFormat, self)
|
||||
|
||||
def recalc(self, ttFont):
|
||||
hmtxTable = ttFont['hmtx']
|
||||
self.advanceWidthMax = max(adv for adv, _ in hmtxTable.metrics.values())
|
||||
if 'hmtx' in ttFont:
|
||||
hmtxTable = ttFont['hmtx']
|
||||
self.advanceWidthMax = max(adv for adv, _ in hmtxTable.metrics.values())
|
||||
|
||||
boundsWidthDict = {}
|
||||
if 'glyf' in ttFont:
|
||||
|
@ -45,8 +45,9 @@ class table__v_h_e_a(DefaultTable.DefaultTable):
|
||||
return sstruct.pack(vheaFormat, self)
|
||||
|
||||
def recalc(self, ttFont):
|
||||
vmtxTable = ttFont['vmtx']
|
||||
self.advanceHeightMax = max(adv for adv, _ in vmtxTable.metrics.values())
|
||||
if 'vmtx' in ttFont:
|
||||
vmtxTable = ttFont['vmtx']
|
||||
self.advanceHeightMax = max(adv for adv, _ in vmtxTable.metrics.values())
|
||||
|
||||
boundsHeightDict = {}
|
||||
if 'glyf' in ttFont:
|
||||
|
Loading…
x
Reference in New Issue
Block a user