diff --git a/Lib/fontTools/pens/svgPathPen.py b/Lib/fontTools/pens/svgPathPen.py index 8231603f8..29d41a802 100644 --- a/Lib/fontTools/pens/svgPathPen.py +++ b/Lib/fontTools/pens/svgPathPen.py @@ -2,7 +2,7 @@ from typing import Callable from fontTools.pens.basePen import BasePen -def pointToString(pt, ntos): +def pointToString(pt, ntos=str): return " ".join(ntos(i) for i in pt) @@ -37,13 +37,7 @@ class SVGPathPen(BasePen): print(tpen.getCommands()) """ - def __init__( - self, - glyphSet, - ntos: Callable[[float], str] = ( - lambda x: ("%.2f" % x) if x != int(x) else str(int(x)) - ), - ): + def __init__(self, glyphSet, ntos: Callable[[float], str] = str): BasePen.__init__(self, glyphSet) self._commands = [] self._lastCommand = None