chore: change batteries

This commit is contained in:
github-actions[bot] 2024-05-15 00:29:21 +00:00
parent 7675b3869f
commit 014db19418
2 changed files with 7 additions and 7 deletions

View file

@ -211,7 +211,7 @@ class FontnameTools:
( '(.*dyslexic ?m)ono', r'\1'), # Open Dyslexic Mono -> Open Dyslexic M ( '(.*dyslexic ?m)ono', r'\1'), # Open Dyslexic Mono -> Open Dyslexic M
( '(overpass ?m)ono', r'\1'), # Overpass Mono -> Overpass M ( '(overpass ?m)ono', r'\1'), # Overpass Mono -> Overpass M
( '(proggyclean) ?tt', r'\1'), # Remove TT from ProggyClean ( '(proggyclean) ?tt', r'\1'), # Remove TT from ProggyClean
( '(terminess) ?\(ttf\)', r'\1'), # Remove TTF from Terminus (after renamed to Terminess) ( r'(terminess) ?\(ttf\)', r'\1'), # Remove TTF from Terminus (after renamed to Terminess)
( '(.*ne)on', r'\1'), # Monaspace shorten face name ( '(.*ne)on', r'\1'), # Monaspace shorten face name
( '(.*ar)gon', r'\1'), # Monaspace shorten face name ( '(.*ar)gon', r'\1'), # Monaspace shorten face name
( '(.*kr)ypton', r'\1'), # Monaspace shorten face name ( '(.*kr)ypton', r'\1'), # Monaspace shorten face name
@ -399,7 +399,7 @@ class FontnameTools:
('Bold-Italic', 'BoldItalic'), # Terminus ('Bold-Italic', 'BoldItalic'), # Terminus
]: ]:
name = re.sub(r'\b' + special[0] + r'\b', special[1], name, 1, re.IGNORECASE) name = re.sub(r'\b' + special[0] + r'\b', special[1], name, 1, re.IGNORECASE)
name = re.sub('[_\s]+', ' ', name) name = re.sub(r'[_\s]+', ' ', name)
matches = re.match(r'([^-]+)(?:-(.*))?', name) matches = re.match(r'([^-]+)(?:-(.*))?', name)
familyname = FontnameTools.camel_casify(matches.group(1)) familyname = FontnameTools.camel_casify(matches.group(1))
style = matches.group(2) style = matches.group(2)

View file

@ -6,7 +6,7 @@
from __future__ import absolute_import, print_function, unicode_literals from __future__ import absolute_import, print_function, unicode_literals
# Change the script version when you edit this script: # Change the script version when you edit this script:
script_version = "4.14.2" script_version = "4.14.3"
version = "3.2.1" version = "3.2.1"
projectName = "Nerd Fonts" projectName = "Nerd Fonts"
@ -429,7 +429,7 @@ class font_patcher:
sanitize_filename(self.args.outputdir, True), sanitize_filename(self.args.outputdir, True),
sanitize_filename(create_filename(sourceFonts)) + ".ttc")) sanitize_filename(create_filename(sourceFonts)) + ".ttc"))
sourceFonts[0].generateTtc(outfile, sourceFonts[1:], flags=gen_flags, layer=layer) sourceFonts[0].generateTtc(outfile, sourceFonts[1:], flags=gen_flags, layer=layer)
message = " Generated {} fonts\n \===> '{}'".format(len(sourceFonts), outfile) message = " Generated {} fonts\n \\===> '{}'".format(len(sourceFonts), outfile)
else: else:
fontname = create_filename(sourceFonts) fontname = create_filename(sourceFonts)
if not fontname: if not fontname:
@ -445,10 +445,10 @@ class font_patcher:
logger.debug("=====> Filename '%s'", outfile) logger.debug("=====> Filename '%s'", outfile)
return return
sourceFont.generate(outfile, bitmap_type=bitmaps, flags=gen_flags) sourceFont.generate(outfile, bitmap_type=bitmaps, flags=gen_flags)
message = " {}\n \===> '{}'".format(sourceFont.fullname, outfile) message = " {}\n \\===> '{}'".format(sourceFont.fullname, outfile)
# Adjust flags that can not be changed via fontforge # Adjust flags that can not be changed via fontforge
if re.search('\\.[ot]tf$', self.args.font, re.IGNORECASE) and re.search('\\.[ot]tf$', outfile, re.IGNORECASE): if re.search(r'\.[ot]tf$', self.args.font, re.IGNORECASE) and re.search(r'\.[ot]tf$', outfile, re.IGNORECASE):
if not os.path.isfile(outfile) or os.path.getsize(outfile) < 1: if not os.path.isfile(outfile) or os.path.getsize(outfile) < 1:
logger.critical("Something went wrong and Fontforge did not generate the new font - look for messages above") logger.critical("Something went wrong and Fontforge did not generate the new font - look for messages above")
sys.exit(1) sys.exit(1)
@ -2062,7 +2062,7 @@ def setup_arguments():
args.extension = os.path.splitext(args.font)[1] args.extension = os.path.splitext(args.font)[1]
else: else:
args.extension = '.' + args.extension args.extension = '.' + args.extension
if re.match("\.ttc$", args.extension, re.IGNORECASE): if re.match(r'\.ttc$', args.extension, re.IGNORECASE):
if not is_ttc: if not is_ttc:
logger.critical("Can not create True Type Collections from single font files") logger.critical("Can not create True Type Collections from single font files")
sys.exit(1) sys.exit(1)