mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2024-09-19 09:51:48 +02:00
Do not truncate subfamily name to avoid MacOS treating fonts as the same
This commit is contained in:
parent
d8b760aeed
commit
5583c6e342
1 changed files with 5 additions and 3 deletions
|
@ -133,10 +133,8 @@ except IndexError:
|
||||||
if subFamily == "Regular":
|
if subFamily == "Regular":
|
||||||
subFamily = fallbackStyle
|
subFamily = fallbackStyle
|
||||||
|
|
||||||
fontname += " - " + subFamily
|
|
||||||
|
|
||||||
if args.windows:
|
if args.windows:
|
||||||
maxLength = 31
|
maxLength = 31 - len('-'+subFamily)
|
||||||
familyname += " " + projectNameAbbreviation
|
familyname += " " + projectNameAbbreviation
|
||||||
fullname += " Windows Compatible"
|
fullname += " Windows Compatible"
|
||||||
# now make sure less than 32 characters name length
|
# now make sure less than 32 characters name length
|
||||||
|
@ -149,6 +147,10 @@ if args.windows:
|
||||||
else:
|
else:
|
||||||
familyname += " " + projectNameSingular
|
familyname += " " + projectNameSingular
|
||||||
|
|
||||||
|
# Don't truncate the subfamily to keep fontname unique. MacOS treats fonts with
|
||||||
|
# the same name as the same font, even if subFamily is different.
|
||||||
|
fontname += '-' + subFamily
|
||||||
|
|
||||||
# rename font
|
# rename font
|
||||||
|
|
||||||
def replace_all(text, dic):
|
def replace_all(text, dic):
|
||||||
|
|
Loading…
Reference in a new issue