]> git.tdb.fi Git - libs/gl.git/commitdiff
Fix a bug in makefont.py if no ranges are given
authorMikko Rasa <tdb@tdb.fi>
Mon, 12 Apr 2021 21:18:07 +0000 (00:18 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 12 Apr 2021 21:52:13 +0000 (00:52 +0300)
scripts/makefont.py

index aa6aa8393a6b0e30b4695c6075a4b6f75ae308c7..e129c9da4c678fb09d0ca72fe091c3f241804528 100755 (executable)
@@ -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: