From 4db19012183dc1131c1e3bcc88a555132c245cae Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Tue, 13 Apr 2021 00:18:07 +0300 Subject: [PATCH] Fix a bug in makefont.py if no ranges are given --- scripts/makefont.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/makefont.py b/scripts/makefont.py index aa6aa839..e129c9da 100755 --- a/scripts/makefont.py +++ b/scripts/makefont.py @@ -71,8 +71,9 @@ def make_font(fn, size, ch_ranges, autohinter, margin, padding, distfield): import os cmd = "ttf2png \"{}\" -o makefont-tmp.png -d makefont-tmp.def -t -p -s {} -m {} -n {} -g".format(fn, size, margin, padding) - for r in ch_ranges: - cmd += " -r {},{}".format(*r) + if ch_ranges: + for r in ch_ranges: + cmd += " -r {},{}".format(*r) if autohinter: cmd += " -a" if distfield: -- 2.45.2