From 1a8cccc8187c7ea1b33e8457894803a963fadf03 Mon Sep 17 00:00:00 2001 From: justvanrossum Date: Wed, 9 Jan 2019 16:14:22 +0100 Subject: [PATCH] explicitly test glyphName = None --- Tests/fontBuilder/fontBuilder_test.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Tests/fontBuilder/fontBuilder_test.py b/Tests/fontBuilder/fontBuilder_test.py index 2ef4bfdab..97d7cb6a7 100644 --- a/Tests/fontBuilder/fontBuilder_test.py +++ b/Tests/fontBuilder/fontBuilder_test.py @@ -255,7 +255,7 @@ def test_unicodeVariationSequences(tmpdir): cmap = {ord(" "): "space", ord("0"): "zero"} uvs = [ (0x0030, 0xFE00, "zero.slash"), - (0x0030, 0xFE01, "zero"), # not an official sequence, just testing + (0x0030, 0xFE01, None), # not an official sequence, just testing ] metrics = {gn: (600, 0) for gn in glyphOrder} pen = TTGlyphPen(None) @@ -275,3 +275,11 @@ def test_unicodeVariationSequences(tmpdir): outPath = os.path.join(str(tmpdir), "test_uvs.ttf") fb.save(outPath) _verifyOutput(outPath, tables=["cmap"]) + + uvs = [ + (0x0030, 0xFE00, "zero.slash"), + (0x0030, 0xFE01, "zero"), # should result in the exact same subtable data, due to cmap[0x0030] == "zero" + ] + fb.setupCharacterMap(cmap, uvs) + fb.save(outPath) + _verifyOutput(outPath, tables=["cmap"])