Do not truncate subfamily name to avoid MacOS treating fonts as the same

This commit is contained in:
Marcus Kellerman 2016-10-14 09:23:56 -07:00
parent d8b760aeed
commit 5583c6e342

View file

@ -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):