diff options
author | James Godfrey-Kittle <jamesgk@google.com> | 2015-08-21 16:10:41 -0700 |
---|---|---|
committer | James Godfrey-Kittle <jamesgk@google.com> | 2015-08-21 16:10:41 -0700 |
commit | 1cae72d2f5fcdf2f8ab02a53846fc0f758725fee (patch) | |
tree | 094f87f1a13ec187f0137e1a04a0bb6097b165a1 /scripts/lib/fontbuild | |
parent | 545be2d7b8074953666c24e4a45beb68e3599219 (diff) |
Always deal with floats when mixing font masters.
Without this change, some of the master data contains int values
which are not interpolated correctly due to numpy array behavior.
For example adding float values to a numpy array of ints will
always result in an array of ints, so a scale value which should be
a float between 0 and 1 might instead be rounded.
Diffstat (limited to 'scripts/lib/fontbuild')
-rw-r--r-- | scripts/lib/fontbuild/mix.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/lib/fontbuild/mix.py b/scripts/lib/fontbuild/mix.py index 58ef246..443dfeb 100644 --- a/scripts/lib/fontbuild/mix.py +++ b/scripts/lib/fontbuild/mix.py @@ -115,8 +115,8 @@ class FGlyph: valuesX.append(g[i].points[j].x) valuesY.append(g[i].points[j].y) - self.dataX = array(valuesX) - self.dataY = array(valuesY) + self.dataX = array(valuesX, dtype=float) + self.dataY = array(valuesY, dtype=float) def copyToGlyph(self,g): g.width = self._derefX(self.width) |