diff options
author | Rasmus Andersson <rasmus@notion.se> | 2018-02-18 07:17:55 +0300 |
---|---|---|
committer | Rasmus Andersson <rasmus@notion.se> | 2018-02-18 07:17:55 +0300 |
commit | 34a5d1b31f99eb6be442be22964728b075b2c7c5 (patch) | |
tree | dac1b529662244b55bbbf6f97ca9d694f2429303 /misc/pylib | |
parent | c06dd62eafeb5f76cf5aad7fbc1b14ebee08c5c1 (diff) | |
download | inter-34a5d1b31f99eb6be442be22964728b075b2c7c5.tar.xz |
minor change to fontbuild
Diffstat (limited to 'misc/pylib')
-rw-r--r-- | misc/pylib/fontbuild/Build.pyx | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/misc/pylib/fontbuild/Build.pyx b/misc/pylib/fontbuild/Build.pyx index 567e1a4c9..ec6a7f59d 100644 --- a/misc/pylib/fontbuild/Build.pyx +++ b/misc/pylib/fontbuild/Build.pyx @@ -148,18 +148,19 @@ class FontProject: # adjust width of italic glyphs if italic == True: widthAdjustment = -8 - leftAdjustment = math.floor(widthAdjustment / 2) - rightAdjustment = math.ceil(widthAdjustment / 2) - for g in f: - if g.name not in self.noItalic: - if g.width != 0: - if g.box is None: - g.width += widthAdjustment - else: - newLeftMargin = int(g.leftMargin + leftAdjustment) - newRightMargin = int(g.rightMargin + rightAdjustment) - g.leftMargin = newLeftMargin - g.rightMargin = newRightMargin + if widthAdjustment != 0: + leftAdjustment = math.floor(widthAdjustment / 2) + rightAdjustment = math.ceil(widthAdjustment / 2) + for g in f: + if g.name not in self.noItalic: + if g.width != 0: + if g.box is None: + g.width += widthAdjustment + else: + newLeftMargin = int(g.leftMargin + leftAdjustment) + newRightMargin = int(g.rightMargin + rightAdjustment) + g.leftMargin = newLeftMargin + g.rightMargin = newRightMargin log(">> Decomposing") # for g in f: |