Use logger instead of printing info
This commit is contained in:
parent
a4e4489b2b
commit
ebebcd9f0d
@ -26,6 +26,7 @@ the resulting splines are interpolation-compatible.
|
|||||||
|
|
||||||
from __future__ import print_function, division, absolute_import
|
from __future__ import print_function, division, absolute_import
|
||||||
|
|
||||||
|
import logging
|
||||||
from fontTools.pens.basePen import AbstractPen
|
from fontTools.pens.basePen import AbstractPen
|
||||||
|
|
||||||
from cu2qu import curves_to_quadratic
|
from cu2qu import curves_to_quadratic
|
||||||
@ -35,6 +36,8 @@ __all__ = ['fonts_to_quadratic', 'font_to_quadratic']
|
|||||||
|
|
||||||
DEFAULT_MAX_ERR = 0.0025
|
DEFAULT_MAX_ERR = 0.0025
|
||||||
|
|
||||||
|
logger = logging.getLogger('cu2qu')
|
||||||
|
|
||||||
|
|
||||||
class IncompatibleGlyphsError(ValueError):
|
class IncompatibleGlyphsError(ValueError):
|
||||||
|
|
||||||
@ -258,8 +261,8 @@ def fonts_to_quadratic(
|
|||||||
|
|
||||||
if modified and dump_stats:
|
if modified and dump_stats:
|
||||||
spline_lengths = sorted(stats.keys())
|
spline_lengths = sorted(stats.keys())
|
||||||
print('New spline lengths:\n%s\n' % (
|
logger.info('New spline lengths:\n%s\n' % ('\n'.join(
|
||||||
'\n'.join('%s: %d' % (l, stats[l]) for l in spline_lengths)))
|
'%s: %d' % (l, stats[l]) for l in spline_lengths)))
|
||||||
return modified
|
return modified
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user