From 96c9250cf85b4b87cb20092faff287dd670ec5b5 Mon Sep 17 00:00:00 2001 From: Miguel Sousa Date: Wed, 31 Aug 2022 08:52:17 -0700 Subject: [PATCH] Update warning message [skip ci] --- Lib/fontTools/ttLib/ttFont.py | 2 +- Tests/ttLib/ttFont_test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/fontTools/ttLib/ttFont.py b/Lib/fontTools/ttLib/ttFont.py index 2e04b0a01..b78be1984 100644 --- a/Lib/fontTools/ttLib/ttFont.py +++ b/Lib/fontTools/ttLib/ttFont.py @@ -493,7 +493,7 @@ class TTFont(object): # Can happen when 'post' format 1 is improperly used on a font that # has more than 258 glyphs (the lenght of 'standardGlyphOrder'). # - log.warning("'post' table format 1 discarded; font has more than 258 glyphs") + log.warning("Not enough names found in the 'post' table, generating them from cmap instead") self._getGlyphNamesFromCmap() else: self.glyphOrder = glyphOrder diff --git a/Tests/ttLib/ttFont_test.py b/Tests/ttLib/ttFont_test.py index a97d6dbc1..eded20164 100644 --- a/Tests/ttLib/ttFont_test.py +++ b/Tests/ttLib/ttFont_test.py @@ -152,7 +152,7 @@ def test_getGlyphOrder_not_true_post_format_1(caplog): assert len(hmtx.metrics) > len(standardGlyphOrder) log_rec = caplog.records[-1] assert log_rec.levelname == "WARNING" - assert "'post' table format 1 discarded" in log_rec.message + assert "Not enough names found in the 'post' table" in log_rec.message @pytest.mark.parametrize("lazy", [None, True, False])