mirror of
https://github.com/ryanoasis/nerd-fonts.git
synced 2025-01-25 03:32:02 +02:00
Fix regular expression for font style splitting
Modify regular expression grouping instead of stripping dash from font style string
This commit is contained in:
parent
7dc096e8b9
commit
7cbc79b9ce
@ -83,9 +83,7 @@ if args.single:
|
||||
|
||||
sourceFont = fontforge.open(args.font)
|
||||
|
||||
fontname, style = re.match("^([^-]*)(?:(-.*))?$", sourceFont.fontname).groups()
|
||||
style = style.replace("-", "")
|
||||
|
||||
fontname, style = re.match("^([^-]*)(?:-(.*))?$", sourceFont.fontname).groups()
|
||||
familyname = sourceFont.familyname.replace(style, "").rstrip()
|
||||
# fullname (filename) can always use long/verbose font name, even in windows
|
||||
fullname = sourceFont.fullname + verboseAdditionalFontNameSuffix
|
||||
|
Loading…
x
Reference in New Issue
Block a user