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)
|
return sstruct.pack(hheaFormat, self)
|
||||||
|
|
||||||
def recalc(self, ttFont):
|
def recalc(self, ttFont):
|
||||||
hmtxTable = ttFont['hmtx']
|
if 'hmtx' in ttFont:
|
||||||
self.advanceWidthMax = max(adv for adv, _ in hmtxTable.metrics.values())
|
hmtxTable = ttFont['hmtx']
|
||||||
|
self.advanceWidthMax = max(adv for adv, _ in hmtxTable.metrics.values())
|
||||||
|
|
||||||
boundsWidthDict = {}
|
boundsWidthDict = {}
|
||||||
if 'glyf' in ttFont:
|
if 'glyf' in ttFont:
|
||||||
|
@ -45,8 +45,9 @@ class table__v_h_e_a(DefaultTable.DefaultTable):
|
|||||||
return sstruct.pack(vheaFormat, self)
|
return sstruct.pack(vheaFormat, self)
|
||||||
|
|
||||||
def recalc(self, ttFont):
|
def recalc(self, ttFont):
|
||||||
vmtxTable = ttFont['vmtx']
|
if 'vmtx' in ttFont:
|
||||||
self.advanceHeightMax = max(adv for adv, _ in vmtxTable.metrics.values())
|
vmtxTable = ttFont['vmtx']
|
||||||
|
self.advanceHeightMax = max(adv for adv, _ in vmtxTable.metrics.values())
|
||||||
|
|
||||||
boundsHeightDict = {}
|
boundsHeightDict = {}
|
||||||
if 'glyf' in ttFont:
|
if 'glyf' in ttFont:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user