1
0
mirror of https://github.com/ryanoasis/nerd-fonts.git synced 2025-01-25 03:32:02 +02:00

Consider font style when generating familyname and fontname

This commit is contained in:
Jamie Rolfs 2016-03-04 19:34:12 -08:00
parent c732f66d30
commit 1a835a5ecf

View File

@ -84,10 +84,12 @@ if args.single:
sourceFont = fontforge.open(args.font)
fontname, style = re.match("^([^-]*)(?:(-.*))?$", sourceFont.fontname).groups()
familyname = sourceFont.familyname
style = style.replace('-', '')
familyname = sourceFont.familyname.replace(style, "").rstrip()
# fullname (filename) can always use long/verbose font name, even in windows
fullname = sourceFont.fullname + verboseAdditionalFontNameSuffix
fontname = fontname + additionalFontNameSuffix.replace(" ", "")
fontname = fontname + additionalFontNameSuffix.replace(" ", "") + "-" + style
if args.windows:
maxLength = 31