Fixup hhea recalc after 9222b8ef93fd6b41f9c4dcf152593cd0c80f0ba4
This commit is contained in:
parent
c360f04754
commit
246301acc9
@ -42,7 +42,7 @@ class table__h_h_e_a(DefaultTable.DefaultTable):
|
|||||||
if ttFont.has_key('glyf'):
|
if ttFont.has_key('glyf'):
|
||||||
glyfTable = ttFont['glyf']
|
glyfTable = ttFont['glyf']
|
||||||
INFINITY = 100000
|
INFINITY = 100000
|
||||||
advanceWidthMax = -INFINITY # arbitrary big negative number
|
advanceWidthMax = 0
|
||||||
minLeftSideBearing = +INFINITY # arbitrary big number
|
minLeftSideBearing = +INFINITY # arbitrary big number
|
||||||
minRightSideBearing = +INFINITY # arbitrary big number
|
minRightSideBearing = +INFINITY # arbitrary big number
|
||||||
xMaxExtent = -INFINITY # arbitrary big negative number
|
xMaxExtent = -INFINITY # arbitrary big negative number
|
||||||
@ -62,18 +62,17 @@ class table__h_h_e_a(DefaultTable.DefaultTable):
|
|||||||
minRightSideBearing = min(minRightSideBearing, rsb)
|
minRightSideBearing = min(minRightSideBearing, rsb)
|
||||||
extent = lsb + (g.xMax - g.xMin)
|
extent = lsb + (g.xMax - g.xMin)
|
||||||
xMaxExtent = max(xMaxExtent, extent)
|
xMaxExtent = max(xMaxExtent, extent)
|
||||||
if advanceWidthMax == -INFINITY:
|
|
||||||
self.advanceWidthMax = 0
|
|
||||||
else:
|
|
||||||
self.advanceWidthMax = advanceWidthMax
|
|
||||||
if xMaxExtent == -INFINITY:
|
if xMaxExtent == -INFINITY:
|
||||||
self.minLeftSideBearing = 0
|
# No glyph has outlines.
|
||||||
self.minRightSideBearing = 0
|
minLeftSideBearing = 0
|
||||||
self.xMaxExtent = 0
|
minRightSideBearing = 0
|
||||||
else:
|
xMaxExtent = 0
|
||||||
self.minLeftSideBearing = minLeftSideBearing
|
|
||||||
self.minRightSideBearing = minRightSideBearing
|
self.advanceWidthMax = advanceWidthMax
|
||||||
self.xMaxExtent = xMaxExtent
|
self.minLeftSideBearing = minLeftSideBearing
|
||||||
|
self.minRightSideBearing = minRightSideBearing
|
||||||
|
self.xMaxExtent = xMaxExtent
|
||||||
else:
|
else:
|
||||||
# XXX CFF recalc...
|
# XXX CFF recalc...
|
||||||
pass
|
pass
|
||||||
|
Loading…
x
Reference in New Issue
Block a user