From 863bdb60c83d3de418f49c1640560efcc7b09f78 Mon Sep 17 00:00:00 2001 From: justvanrossum Date: Wed, 9 Jan 2019 15:02:48 +0100 Subject: [PATCH] allow dumping/verifying a custom subset of the tables --- Tests/fontBuilder/data/test_uvs.ttf.ttx | 193 ------------------------ Tests/fontBuilder/fontBuilder_test.py | 6 +- 2 files changed, 3 insertions(+), 196 deletions(-) diff --git a/Tests/fontBuilder/data/test_uvs.ttf.ttx b/Tests/fontBuilder/data/test_uvs.ttf.ttx index 04730d0f6..ab05bed3a 100644 --- a/Tests/fontBuilder/data/test_uvs.ttf.ttx +++ b/Tests/fontBuilder/data/test_uvs.ttf.ttx @@ -1,134 +1,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -145,69 +17,4 @@ - - - - - - - - - - - - - - - - - - - - - UVSTestFont - - - Regular - - - UVSTestFont-Regular - - - UVSTestFont - - - Regular - - - UVSTestFont-Regular - - - - - - - - - - - - - - - - - - - - - - diff --git a/Tests/fontBuilder/fontBuilder_test.py b/Tests/fontBuilder/fontBuilder_test.py index dda3b7409..2ef4bfdab 100644 --- a/Tests/fontBuilder/fontBuilder_test.py +++ b/Tests/fontBuilder/fontBuilder_test.py @@ -53,9 +53,9 @@ def _setupFontBuilder(isTTF, unitsPerEm=1024): return fb, advanceWidths, nameStrings -def _verifyOutput(outPath): +def _verifyOutput(outPath, tables=None): f = TTFont(outPath) - f.saveXML(outPath + ".ttx") + f.saveXML(outPath + ".ttx", tables=tables) with open(outPath + ".ttx") as f: testData = strip_VariableItems(f.read()) refData = strip_VariableItems(getTestData(os.path.basename(outPath) + ".ttx")) @@ -274,4 +274,4 @@ def test_unicodeVariationSequences(tmpdir): outPath = os.path.join(str(tmpdir), "test_uvs.ttf") fb.save(outPath) - _verifyOutput(outPath) + _verifyOutput(outPath, tables=["cmap"])