From c32d23ade79ff06620c636d7a73250993eaeef5d Mon Sep 17 00:00:00 2001 From: Fini Jastrow Date: Mon, 27 Nov 2023 20:53:16 +0100 Subject: [PATCH] name_parser: Do remove non-US SFNT entries [why] Albeight documented in the comment not all non English-US entries are removed but just al TO_DEL ones. [how] Put the conditional in the right position. Signed-off-by: Fini Jastrow --- bin/scripts/name_parser/FontnameParser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/scripts/name_parser/FontnameParser.py b/bin/scripts/name_parser/FontnameParser.py index 2eecea5592d..0bf405bb7d2 100644 --- a/bin/scripts/name_parser/FontnameParser.py +++ b/bin/scripts/name_parser/FontnameParser.py @@ -348,9 +348,9 @@ def rename_font(self, font): # back, but only as 'English (US)'. This makes sure we do not leave contradicting # names over different languages. for l, k, v in list(font.sfnt_names): - if not k in TO_DEL: + if not k in TO_DEL and l == 'English (US)': sfnt_list += [( l, k, v )] - if k == 'Version' and l == 'English (US)': + if k == 'Version': version_tag = ' ' + v.split()[-1] sfnt_list += [( 'English (US)', 'Family', self.checklen(31, 'Family (ID 1)', self.family()) )] # 1