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:
parent
c732f66d30
commit
1a835a5ecf
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user