diff options
author | Rasmus Andersson <rasmus@notion.se> | 2017-08-25 04:23:54 +0300 |
---|---|---|
committer | Rasmus Andersson <rasmus@notion.se> | 2017-08-25 04:23:54 +0300 |
commit | 35b665572888a0b54c792dd5270fc4aaa740b4ef (patch) | |
tree | 940e59048e82ddca7c59bed2f37734efabecae45 /misc | |
parent | d8975d91355311ffc7f1ec4cb9092495adf36a22 (diff) | |
download | inter-35b665572888a0b54c792dd5270fc4aaa740b4ef.tar.xz |
adjust misc/gen-tnum.py
Diffstat (limited to 'misc')
-rwxr-xr-x | misc/gen-tnum.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/misc/gen-tnum.py b/misc/gen-tnum.py index 627a38354..015201bcc 100755 --- a/misc/gen-tnum.py +++ b/misc/gen-tnum.py @@ -45,11 +45,11 @@ def main(): tnum = font.newGlyph(name + '.tnum') tnum.width = width - print('[%s] gen' % fontName, tnum.name) # calculate component x-offset xoffs = 0 if g.width != width: + print('[%s] gen (adjust width)' % fontName, tnum.name) # center shape, ignoring existing margins # xMin, yMin, xMax, yMax = g.box # graphicWidth = xMax - xMin @@ -61,6 +61,8 @@ def main(): leftMargin = g.leftMargin + int(floor(widthDelta / 2)) rightMargin = g.rightMargin + int(ceil(widthDelta / 2)) xoffs = leftMargin - g.leftMargin + else: + print('[%s] gen (same width)' % fontName, tnum.name) tnum.appendComponent(name, (xoffs, 0)) |