From: Mikko Rasa Date: Mon, 12 Apr 2021 21:18:07 +0000 (+0300) Subject: Fix a bug in makefont.py if no ranges are given X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=4db19012183dc1131c1e3bcc88a555132c245cae;p=libs%2Fgl.git Fix a bug in makefont.py if no ranges are given --- 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: