Skip to content

Commit 622de68

Browse files
committed
font-patcher: Fix patching woff files
[why] After we added the possibility to process font archives (.ttc) we lost the ability to process woff and woff2 fonts. It seems woff(2) files show no font names in fontforge, see fontforge/fontforge#1964 [how] Open woff(2) files differently. Fixes: #1647 (further down) Signed-off-by: Fini Jastrow <[email protected]>
1 parent 9f85498 commit 622de68

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

font-patcher

+6-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from __future__ import absolute_import, print_function, unicode_literals
77

88
# Change the script version when you edit this script:
9-
script_version = "4.14.4"
9+
script_version = "4.14.5"
1010

1111
version = "3.2.1"
1212
projectName = "Nerd Fonts"
@@ -2128,8 +2128,11 @@ def main():
21282128
sourceFonts = []
21292129
all_fonts = fontforge.fontsInFile(args.font)
21302130
if not all_fonts:
2131-
logger.critical("Can not find any fonts in '%s'", args.font)
2132-
sys.exit(1)
2131+
if re.match(".*\\.woff2?", args.font, re.I):
2132+
all_fonts=[ "" ]
2133+
else:
2134+
logger.critical("Can not find any fonts in '%s'", args.font)
2135+
sys.exit(1)
21332136
for i, subfont in enumerate(all_fonts):
21342137
if len(all_fonts) > 1:
21352138
print("\n")

0 commit comments

Comments
 (0)