mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2024-09-12 09:41:47 +02:00
Take the style from the filename if it's longer than the subfamily (fixes #257)
This commit is contained in:
parent
c41890f82b
commit
bfe4befabe
1 changed files with 5 additions and 0 deletions
|
@ -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 SubFmaily is "Italic" and the filename is *-BoldItalic.
|
||||
if len(subFamily) < len(fallbackStyle):
|
||||
subFamily = fallbackStyle
|
||||
|
||||
if self.args.windows:
|
||||
maxFamilyLength = 31
|
||||
maxFontLength = maxFamilyLength - len('-' + subFamily)
|
||||
|
|
Loading…
Reference in a new issue