Skip to content

Commit

Permalink
name_parser: Do remove non-US SFNT entries
Browse files Browse the repository at this point in the history
[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 <[email protected]>
  • Loading branch information
Finii committed Mar 17, 2024
1 parent 87799d4 commit c32d23a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/scripts/name_parser/FontnameParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c32d23a

Please sign in to comment.