Drop nameID 25 if instantiating a static font
This commit is contained in:
parent
a7913ef50e
commit
52fec53d20
@ -314,6 +314,9 @@ def _updateNameTableStyleRecords(
|
|||||||
assert string, nameID
|
assert string, nameID
|
||||||
nametable.setName(string, nameID, *platform)
|
nametable.setName(string, nameID, *platform)
|
||||||
|
|
||||||
|
if "fvar" not in varfont:
|
||||||
|
nametable.removeNames(NameID.VARIATIONS_POSTSCRIPT_NAME_PREFIX)
|
||||||
|
|
||||||
|
|
||||||
def _updatePSNameRecord(varfont, familyName, styleName, platform):
|
def _updatePSNameRecord(varfont, familyName, styleName, platform):
|
||||||
# Implementation based on Adobe Technical Note #5902 :
|
# Implementation based on Adobe Technical Note #5902 :
|
||||||
|
@ -39,11 +39,15 @@ def _test_name_records(varfont, expected, isNonRIBBI, platforms=[0x409]):
|
|||||||
if k[-1] not in platforms:
|
if k[-1] not in platforms:
|
||||||
continue
|
continue
|
||||||
assert font_names[k] == expected[k]
|
assert font_names[k] == expected[k]
|
||||||
|
|
||||||
|
font_nameids = set(i[0] for i in font_names)
|
||||||
if isNonRIBBI:
|
if isNonRIBBI:
|
||||||
font_nameids = set(i[0] for i in font_names)
|
|
||||||
assert 16 in font_nameids
|
assert 16 in font_nameids
|
||||||
assert 17 in font_nameids
|
assert 17 in font_nameids
|
||||||
|
|
||||||
|
if "fvar" not in varfont:
|
||||||
|
assert 25 not in font_nameids
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"limits, expected, isNonRIBBI",
|
"limits, expected, isNonRIBBI",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user