Use logging module for these warnings
Not sure if warnings module was used intentionally here, but the messages looked odd compared to other FontTools messages.
This commit is contained in:
parent
9b2967fa39
commit
61670fc652
@ -17,7 +17,6 @@ from fontTools.otlLib import builder as otl
|
|||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
from operator import setitem
|
from operator import setitem
|
||||||
import logging
|
import logging
|
||||||
import warnings
|
|
||||||
|
|
||||||
class MtiLibError(Exception): pass
|
class MtiLibError(Exception): pass
|
||||||
class ReferenceNotFoundError(MtiLibError): pass
|
class ReferenceNotFoundError(MtiLibError): pass
|
||||||
@ -1074,7 +1073,7 @@ class Tokenizer(object):
|
|||||||
if len(line) == 1 and not line[0]:
|
if len(line) == 1 and not line[0]:
|
||||||
del line[0]
|
del line[0]
|
||||||
if line and not line[-1]:
|
if line and not line[-1]:
|
||||||
warnings.warn('trailing tab found on line %d: %s' % (self.lineno, self.line))
|
log.warn('trailing tab found on line %d: %s' % (self.lineno, self.line))
|
||||||
while line and not line[-1]:
|
while line and not line[-1]:
|
||||||
del line[-1]
|
del line[-1]
|
||||||
return line
|
return line
|
||||||
|
@ -30,7 +30,6 @@ from fontTools.ttLib.tables import otTables as ot
|
|||||||
from fontTools.varLib import builder, designspace, models
|
from fontTools.varLib import builder, designspace, models
|
||||||
from fontTools.varLib.merger import VariationMerger, _all_equal
|
from fontTools.varLib.merger import VariationMerger, _all_equal
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
import warnings
|
|
||||||
import os.path
|
import os.path
|
||||||
import logging
|
import logging
|
||||||
from pprint import pformat
|
from pprint import pformat
|
||||||
@ -219,7 +218,7 @@ def _add_gvar(font, model, master_ttfs, tolerance=.5):
|
|||||||
allControls = [d[1] for d in allData]
|
allControls = [d[1] for d in allData]
|
||||||
control = allControls[0]
|
control = allControls[0]
|
||||||
if (any(c != control for c in allControls)):
|
if (any(c != control for c in allControls)):
|
||||||
warnings.warn("glyph %s has incompatible masters; skipping" % glyph)
|
log.warn("glyph %s has incompatible masters; skipping" % glyph)
|
||||||
continue
|
continue
|
||||||
del allControls
|
del allControls
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user