summaryrefslogtreecommitdiff
path: root/scripts/lib
diff options
context:
space:
mode:
authorJames Godfrey-Kittle <jamesgk@google.com>2015-05-13 17:33:03 -0700
committerjamesgk <jamesgk19@gmail.com>2015-05-13 17:33:03 -0700
commit40de23b7170ef01d2521881d7c8ff307c64fbdc6 (patch)
tree3c724b2b6a75a713eeca50b57b451be33ef1f942 /scripts/lib
parent6d3a657a5f0b15ac23e877acc68828b69e9b8881 (diff)
Correctly copy FGlyphs to RoboFab RGlyphs.
This caused some glyph mixes to fail.
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/fontbuild/mix.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/scripts/lib/fontbuild/mix.py b/scripts/lib/fontbuild/mix.py
index ef190ef..63f218f 100644
--- a/scripts/lib/fontbuild/mix.py
+++ b/scripts/lib/fontbuild/mix.py
@@ -122,10 +122,10 @@ class FGlyph:
g.width = self._derefX(self.width)
if len(g.components) == len(self.components):
for i in range(len(self.components)):
- g.components[i].scale[0] = self._derefX(self.components[i][0] + 0)
- g.components[i].scale[1] = self._derefY(self.components[i][1] + 0)
- g.components[i].offset[0] = self._derefX(self.components[i][0] + 1)
- g.components[i].offset[1] = self._derefY(self.components[i][1] + 1)
+ g.components[i].scale = (self._derefX(self.components[i][0] + 0),
+ self._derefY(self.components[i][1] + 0))
+ g.components[i].offset = (self._derefX(self.components[i][0] + 1),
+ self._derefY(self.components[i][1] + 1))
if len(g.anchors) == len(self.anchors):
for i in range(len(self.anchors)):
g.anchors[i].x = self._derefX( self.anchors[i][0])
@@ -301,11 +301,7 @@ class Mix:
if gF == None:
g.mark = True
else:
- # FIX THIS #print gF.name, g.name, len(gF.nodes),len(g.nodes),len(gF.components),len(g.components)
- try:
- gF.copyToGlyph(g)
- except:
- "Nodes incompatible"
+ gF.copyToGlyph(g)
newFont.kerning.clear()
newFont.kerning.update(self.mixKerns() or {})
return newFont