explicitly test glyphName = None

This commit is contained in:
justvanrossum 2019-01-09 16:14:22 +01:00
parent 863bdb60c8
commit 1a8cccc818

View File

@ -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"])