From 43c895f9ac4b9c04570bc9f3cab2680cffbda1de Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Sun, 26 Nov 2017 22:53:00 +0000 Subject: [PATCH] When stroking a font, adjust the BlueValues accordingly. --- strokefont.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/strokefont.py b/strokefont.py index 4b257d6..49494e8 100644 --- a/strokefont.py +++ b/strokefont.py @@ -22,6 +22,10 @@ class Stroker(object): f.fullname = self.fullname f.private['StdHW'] = self.nibheight f.private['StdVW'] = self.nibwidth + def adjustblue(y): return y - 100 + self.nibheight + bv = list(f.private['BlueValues']) + bv[1:] = map(adjustblue, bv[1:]) + f.private['BlueValues'] = tuple(bv) f.uwidth = self.nibheight f.os2_weight = self.ttfweight f.weight = self.weight -- 2.30.2