feaLib: demote warning about redefined kern pairs to debug message

https://github.com/fonttools/fonttools/issues/1147#issuecomment-421539956
This commit is contained in:
Cosimo Lupo 2018-09-15 10:09:49 +02:00
parent 0431360cf2
commit 9536541aba
No known key found for this signature in database
GPG Key ID: 59D54DB0C9976482
2 changed files with 3 additions and 4 deletions

View File

@ -1515,10 +1515,9 @@ class PairPosBuilder(LookupBuilder):
oldValue = self.glyphPairs.get(key, None)
if oldValue is not None:
# the Feature File spec explicitly allows specific pairs generated
# by an 'enum' rule to be overridden by preceding single pairs;
# we emit a warning and use the previously defined value
# by an 'enum' rule to be overridden by preceding single pairs
otherLoc = self.locations[key]
log.warning(
log.debug(
'Already defined position for pair %s %s at %s:%d:%d; '
'choosing the first value',
glyph1, glyph2, otherLoc[0], otherLoc[1], otherLoc[2])

View File

@ -202,7 +202,7 @@ class BuilderTest(unittest.TestCase):
def test_pairPos_redefinition_warning(self):
# https://github.com/fonttools/fonttools/issues/1147
logger = logging.getLogger("fontTools.feaLib.builder")
with CapturingLogHandler(logger, "WARNING") as captor:
with CapturingLogHandler(logger, "DEBUG") as captor:
# the pair "yacute semicolon" is redefined in the enum pos
font = self.build(
"@Y_LC = [y yacute ydieresis];"