]> git.draconx.ca Git - scripts.git/commitdiff
mplus-t-gen: Update scale and add python3 compatibility.
authorNick Bowler <nbowler@draconx.ca>
Mon, 29 Jan 2018 01:19:01 +0000 (20:19 -0500)
committerNick Bowler <nbowler@draconx.ca>
Mon, 29 Jan 2018 01:29:39 +0000 (20:29 -0500)
Newer fontforge supports python3, and the only problem we have is the
obsolete print syntax.  Easy enough to fix.

For whatever reason the font looks too big now (maybe due to newer
fontforge?), so let's dial down the scale a bit to make it look
reasonable again.

mplus-t-gen.py

index d95702a5416228484ca4b3d19532ac753a7904e1..b5c2b9d8841eef152f9e459d955723e6df54b497 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 # coding=utf-8
 #
-# Copyright © 2011 Nick Bowler
+# Copyright © 2011, 2018 Nick Bowler
 #
 # Generates new M+ fonts with the CJK characters enlarged, based on the IPAG
 # versions.  This gives better proportions relative to DejaVu Sans Mono in
@@ -31,8 +31,8 @@ for family in families:
        for glyph in font.selection.all().byGlyphs:
                for s in scripts:
                        if (glyph.script == s):
-                               glyph.transform(psMat.scale(1.35))
+                               glyph.transform(psMat.scale(1.25))
 
-       print "Generating " + font.familyname + ".ttf"
+       print("Generating %s.ttf" % (font.familyname))
        font.generate(font.familyname + ".ttf")
        font.close()