From 742ed88b073de0b826e286463165835e3ab09afd Mon Sep 17 00:00:00 2001 From: editkid Date: Thu, 9 May 2019 23:13:15 +1200 Subject: [PATCH] Apply intRect to FontBBox to prevent type error --- Lib/fontTools/ttLib/tables/_h_e_a_d.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/fontTools/ttLib/tables/_h_e_a_d.py b/Lib/fontTools/ttLib/tables/_h_e_a_d.py index 4235acf4b..42fbb1d49 100644 --- a/Lib/fontTools/ttLib/tables/_h_e_a_d.py +++ b/Lib/fontTools/ttLib/tables/_h_e_a_d.py @@ -4,6 +4,7 @@ from fontTools.misc import sstruct from fontTools.misc.textTools import safeEval, num2binary, binary2num from fontTools.misc.timeTools import timestampFromString, timestampToString, timestampNow from fontTools.misc.timeTools import epoch_diff as mac_epoch_diff # For backward compat +from fontTools.misc.arrayTools import intRect from . import DefaultTable import logging @@ -63,7 +64,7 @@ class table__h_e_a_d(DefaultTable.DefaultTable): # For TT-flavored fonts, xMin, yMin, xMax and yMax are set in table__m_a_x_p.recalc(). if 'CFF ' in ttFont: topDict = ttFont['CFF '].cff.topDictIndex[0] - self.xMin, self.yMin, self.xMax, self.yMax = topDict.FontBBox + self.xMin, self.yMin, self.xMax, self.yMax = intRect(topDict.FontBBox) if ttFont.recalcTimestamp: self.modified = timestampNow() data = sstruct.pack(headFormat, self)