summaryrefslogtreecommitdiff
path: root/scripts/lib
diff options
context:
space:
mode:
authorJames Godfrey-Kittle <jamesgk19@gmail.com>2015-09-02 11:27:08 -0700
committerJames Godfrey-Kittle <jamesgk19@gmail.com>2015-09-02 11:27:08 -0700
commitc5d7c05a8aa30834d5b3514c506d0a574cfb7084 (patch)
treefd083f8686860a32e7fc8074a5aa1e08a1622a25 /scripts/lib
parentda5a7c35c3bc024415ac521caf36d61e6e7d36cf (diff)
parent0afea67e9943ee566eb52d7d0f95de5f8a358152 (diff)
Merge pull request #105 from jamesgk/shape-fix
Don't use RGlyph.getParent.
Diffstat (limited to 'scripts/lib')
-rw-r--r--scripts/lib/fontbuild/Build.py4
-rw-r--r--scripts/lib/fontbuild/decomposeGlyph.py4
-rw-r--r--scripts/lib/fontbuild/mix.py2
3 files changed, 5 insertions, 5 deletions
diff --git a/scripts/lib/fontbuild/Build.py b/scripts/lib/fontbuild/Build.py
index 490fe45..d1e870a 100644
--- a/scripts/lib/fontbuild/Build.py
+++ b/scripts/lib/fontbuild/Build.py
@@ -150,7 +150,7 @@ class FontProject:
swapContours(f, gname.replace(swap,""), gname)
for gname in self.predecompose:
if f.has_key(gname):
- decomposeGlyph(f[gname])
+ decomposeGlyph(f, gname)
log(">> Generating glyphs")
generateGlyphs(f, self.diacriticList, self.adobeGlyphList)
@@ -159,7 +159,7 @@ class FontProject:
log(">> Decomposing")
for gname in self.decompose:
if f.has_key(gname):
- decomposeGlyph(f[gname])
+ decomposeGlyph(f, gname)
setNamesRF(f, n, foundry=self.config.get('main', 'foundry'),
version=self.config.get('main', 'version'))
diff --git a/scripts/lib/fontbuild/decomposeGlyph.py b/scripts/lib/fontbuild/decomposeGlyph.py
index 2d7537c..b3db2d6 100644
--- a/scripts/lib/fontbuild/decomposeGlyph.py
+++ b/scripts/lib/fontbuild/decomposeGlyph.py
@@ -1,7 +1,7 @@
-def decomposeGlyph(glyph):
+def decomposeGlyph(font, glyphName):
"""Moves the components of a glyph to its outline."""
- font = glyph.getParent()
+ glyph = font[glyphName]
for component in glyph.components:
componentGlyph = font[component.baseGlyph]
for contour in componentGlyph:
diff --git a/scripts/lib/fontbuild/mix.py b/scripts/lib/fontbuild/mix.py
index 443dfeb..519b50d 100644
--- a/scripts/lib/fontbuild/mix.py
+++ b/scripts/lib/fontbuild/mix.py
@@ -249,7 +249,7 @@ class Master:
size = len(g)
csize = len(g.components)
if (size > 0 and csize > 0):
- decomposeGlyph(g)
+ decomposeGlyph(self.font, g.name)
if overlayPath != None:
overlayFont = OpenFont(overlayPath)