[hhea/vhea] cast to int when using math.ceil and floor
Fixes https://github.com/fonttools/fonttools/issues/1064
This commit is contained in:
parent
72927cde87
commit
ae73c45e6a
@ -68,7 +68,8 @@ class table__h_h_e_a(DefaultTable.DefaultTable):
|
||||
cs = topDict.CharStrings[name]
|
||||
bounds = cs.calcBounds()
|
||||
if bounds is not None:
|
||||
boundsWidthDict[name] = math.ceil(bounds[2]) - math.floor(bounds[0])
|
||||
boundsWidthDict[name] = int(
|
||||
math.ceil(bounds[2]) - math.floor(bounds[0]))
|
||||
|
||||
if boundsWidthDict:
|
||||
minLeftSideBearing = float('inf')
|
||||
|
@ -67,7 +67,8 @@ class table__v_h_e_a(DefaultTable.DefaultTable):
|
||||
cs = topDict.CharStrings[name]
|
||||
bounds = cs.calcBounds()
|
||||
if bounds is not None:
|
||||
boundsHeightDict[name] = math.ceil(bounds[3]) - math.floor(bounds[1])
|
||||
boundsHeightDict[name] = int(
|
||||
math.ceil(bounds[3]) - math.floor(bounds[1]))
|
||||
|
||||
if boundsHeightDict:
|
||||
minTopSideBearing = float('inf')
|
||||
|
Loading…
x
Reference in New Issue
Block a user