From e931d184cb07db6446957e6857dcf174b303e922 Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Fri, 4 Aug 2023 16:40:28 +0100 Subject: [PATCH] keep or drop nameID=16 and 17 only when *both* == 1 and 2 Fixes #744 --- Lib/ufo2ft/outlineCompiler.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Lib/ufo2ft/outlineCompiler.py b/Lib/ufo2ft/outlineCompiler.py index 8e145c6b..ae0d52dd 100644 --- a/Lib/ufo2ft/outlineCompiler.py +++ b/Lib/ufo2ft/outlineCompiler.py @@ -415,10 +415,9 @@ def setupTable_name(self): 22: getAttrWithFallback(font.info, "openTypeNameWWSSubfamilyName"), } - # don't add typographic names if they are the same as the legacy ones - if nameVals[1] == nameVals[16]: + # don't add typographic names if *both* are the same as the legacy ones + if nameVals[1] == nameVals[16] and nameVals[2] == nameVals[17]: del nameVals[16] - if nameVals[2] == nameVals[17]: del nameVals[17] # postscript font name if nameVals[6]: