From ebebcd9f0da1c200d7875c57f884ac934bc887ea Mon Sep 17 00:00:00 2001 From: James Godfrey-Kittle Date: Tue, 29 Nov 2016 16:57:42 -0800 Subject: [PATCH] Use logger instead of printing info --- Lib/cu2qu/ufo.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Lib/cu2qu/ufo.py b/Lib/cu2qu/ufo.py index bf8fdbbfd..425ee5ff0 100644 --- a/Lib/cu2qu/ufo.py +++ b/Lib/cu2qu/ufo.py @@ -26,6 +26,7 @@ the resulting splines are interpolation-compatible. from __future__ import print_function, division, absolute_import +import logging from fontTools.pens.basePen import AbstractPen from cu2qu import curves_to_quadratic @@ -35,6 +36,8 @@ __all__ = ['fonts_to_quadratic', 'font_to_quadratic'] DEFAULT_MAX_ERR = 0.0025 +logger = logging.getLogger('cu2qu') + class IncompatibleGlyphsError(ValueError): @@ -258,8 +261,8 @@ def fonts_to_quadratic( if modified and dump_stats: spline_lengths = sorted(stats.keys()) - print('New spline lengths:\n%s\n' % ( - '\n'.join('%s: %d' % (l, stats[l]) for l in spline_lengths))) + logger.info('New spline lengths:\n%s\n' % ('\n'.join( + '%s: %d' % (l, stats[l]) for l in spline_lengths))) return modified