diff --git a/Lib/fontTools/misc/fixedTools.py b/Lib/fontTools/misc/fixedTools.py index e0ed4436c..036ef1056 100644 --- a/Lib/fontTools/misc/fixedTools.py +++ b/Lib/fontTools/misc/fixedTools.py @@ -21,6 +21,11 @@ __all__ = [ ] +# the max value that can still fit in an F2Dot14: +# 1.99993896484375 +MAX_F2DOT14 = 0x7FFF / (1 << 14) + + def otRound(value): """Round float value to nearest integer towards +Infinity. For fractional values of 0.5 and higher, take the next higher integer; diff --git a/Lib/fontTools/pens/ttGlyphPen.py b/Lib/fontTools/pens/ttGlyphPen.py index 1f0830ef3..3996e3cd8 100644 --- a/Lib/fontTools/pens/ttGlyphPen.py +++ b/Lib/fontTools/pens/ttGlyphPen.py @@ -1,5 +1,6 @@ from fontTools.misc.py23 import * from array import array +from fontTools.misc.fixedTools import MAX_F2DOT14 from fontTools.pens.basePen import LoggingPen from fontTools.pens.transformPen import TransformPen from fontTools.ttLib.tables import ttProgram @@ -11,11 +12,6 @@ from fontTools.ttLib.tables._g_l_y_f import GlyphCoordinates __all__ = ["TTGlyphPen"] -# the max value that can still fit in an F2Dot14: -# 1.99993896484375 -MAX_F2DOT14 = 0x7FFF / (1 << 14) - - class TTGlyphPen(LoggingPen): """Pen used for drawing to a TrueType glyph.