move MAX_F2DOT14 constant to fixedTools
This commit is contained in:
parent
d96c92f95e
commit
550711e106
@ -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):
|
def otRound(value):
|
||||||
"""Round float value to nearest integer towards +Infinity.
|
"""Round float value to nearest integer towards +Infinity.
|
||||||
For fractional values of 0.5 and higher, take the next higher integer;
|
For fractional values of 0.5 and higher, take the next higher integer;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
from fontTools.misc.py23 import *
|
from fontTools.misc.py23 import *
|
||||||
from array import array
|
from array import array
|
||||||
|
from fontTools.misc.fixedTools import MAX_F2DOT14
|
||||||
from fontTools.pens.basePen import LoggingPen
|
from fontTools.pens.basePen import LoggingPen
|
||||||
from fontTools.pens.transformPen import TransformPen
|
from fontTools.pens.transformPen import TransformPen
|
||||||
from fontTools.ttLib.tables import ttProgram
|
from fontTools.ttLib.tables import ttProgram
|
||||||
@ -11,11 +12,6 @@ from fontTools.ttLib.tables._g_l_y_f import GlyphCoordinates
|
|||||||
__all__ = ["TTGlyphPen"]
|
__all__ = ["TTGlyphPen"]
|
||||||
|
|
||||||
|
|
||||||
# the max value that can still fit in an F2Dot14:
|
|
||||||
# 1.99993896484375
|
|
||||||
MAX_F2DOT14 = 0x7FFF / (1 << 14)
|
|
||||||
|
|
||||||
|
|
||||||
class TTGlyphPen(LoggingPen):
|
class TTGlyphPen(LoggingPen):
|
||||||
"""Pen used for drawing to a TrueType glyph.
|
"""Pen used for drawing to a TrueType glyph.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user