1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2025-02-12 12:45:44 +02:00

Merge pull request #526 from duganchen/plex-italic-names

Take the style from the filename if it's longer than the subfamily (fixes #257)
This commit is contained in:
Ryan L McIntyre 2021-01-29 20:56:08 -08:00 committed by GitHub
commit 4fe99fb0b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -293,6 +293,11 @@ class font_patcher:
# some fonts have inaccurate 'SubFamily', if it is Regular let us trust the filename more:
if subFamily == "Regular":
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 self.args.windows:
maxFamilyLength = 31
maxFontLength = maxFamilyLength - len('-' + subFamily)