Skip to content

Commit a5abd84

Browse files
committed
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 <ulf.fini.jastrow@desy.de>
1 parent 926d741 commit a5abd84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/scripts/name_parser/FontnameParser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,9 @@ def rename_font(self, font):
339339
# back, but only as 'English (US)'. This makes sure we do not leave contradicting
340340
# names over different languages.
341341
for l, k, v in list(font.sfnt_names):
342-
if not k in TO_DEL:
342+
if not k in TO_DEL and l == 'English (US)':
343343
sfnt_list += [( l, k, v )]
344-
if k == 'Version' and l == 'English (US)':
344+
if k == 'Version':
345345
version_tag = ' ' + v.split()[-1]
346346

347347
sfnt_list += [( 'English (US)', 'Family', self.checklen(31, 'Family (ID 1)', self.family()) )] # 1

0 commit comments

Comments
 (0)