diff --git a/bin/scripts/name_parser/FontnameParser.py b/bin/scripts/name_parser/FontnameParser.py index db92bccb3..0c3652016 100644 --- a/bin/scripts/name_parser/FontnameParser.py +++ b/bin/scripts/name_parser/FontnameParser.py @@ -302,6 +302,9 @@ class FontnameParser: sfnt_list = [] TO_DEL = ['Family', 'SubFamily', 'Fullname', 'Postscriptname', 'Preferred Family', 'Preferred Styles', 'Compatible Full', 'WWS Family', 'WWS Subfamily'] + # Remove these entries in all languages and add (at least the vital ones) some + # 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: sfnt_list += [( l, k, v )] diff --git a/font-patcher b/font-patcher index 934f49edc..746942b83 100755 --- a/font-patcher +++ b/font-patcher @@ -6,7 +6,7 @@ from __future__ import absolute_import, print_function, unicode_literals # Change the script version when you edit this script: -script_version = "3.4.0" +script_version = "3.4.1" version = "2.3.0-RC" projectName = "Nerd Fonts" @@ -512,13 +512,16 @@ class font_patcher: subFamily = fallbackStyle # some fonts have inaccurate 'SubFamily', if it is Regular let us trust the filename more: - if subFamily == "Regular": + if subFamily == "Regular" and len(fallbackStyle): subFamily = fallbackStyle # This is meant to cover the case where the SubFamily is "Italic" and the filename is *-BoldItalic. if len(subFamily) < len(fallbackStyle): subFamily = fallbackStyle + if len(subFamily) == 0: + subFamily = "Regular" + if self.args.windows: maxFamilyLength = 31 maxFontLength = maxFamilyLength - len('-' + subFamily)