diff options
author | James Godfrey-Kittle <jamesgk@google.com> | 2015-06-17 17:04:37 -0700 |
---|---|---|
committer | James Godfrey-Kittle <jamesgk@google.com> | 2015-06-17 17:04:37 -0700 |
commit | 3ce1b056a9dad26b32e3d7ffcf5d2299977465d4 (patch) | |
tree | 392a1f02b5bda67ecad53f75030a248f626f54bc /scripts/lib/fontbuild | |
parent | 965cee5b90dff5ea64afbc2fdc6bf7dd07a433c3 (diff) |
Revise updated scripts to run without FontLab.
Diffstat (limited to 'scripts/lib/fontbuild')
-rw-r--r-- | scripts/lib/fontbuild/anchors.py | 6 | ||||
-rw-r--r-- | scripts/lib/fontbuild/generateGlyph.py | 14 |
2 files changed, 6 insertions, 14 deletions
diff --git a/scripts/lib/fontbuild/anchors.py b/scripts/lib/fontbuild/anchors.py index 51fb57a..a617b2f 100644 --- a/scripts/lib/fontbuild/anchors.py +++ b/scripts/lib/fontbuild/anchors.py @@ -32,9 +32,9 @@ def moveMarkAnchors(f, g, anchorName, accentName, dx, dy): anchors = f[accentName].anchors for anchor in anchors: if "mkmktop_acc" == anchor.name: - for i in range(len(g.anchors)): - if g.anchors[i].name == "top": - del g.anchors[i] + for anc in g.anchors: + if anc.name == "top": + g.removeAnchor(anc) break g.appendAnchor("top", (anchor.x + int(dx), anchor.y + int(dy))) diff --git a/scripts/lib/fontbuild/generateGlyph.py b/scripts/lib/fontbuild/generateGlyph.py index 4079046..d7e49d8 100644 --- a/scripts/lib/fontbuild/generateGlyph.py +++ b/scripts/lib/fontbuild/generateGlyph.py @@ -70,16 +70,10 @@ def copyMarkAnchors(f, g, srcname, width): if anc.name == "bottom": bottom_present = 1 if 0 == bottom_present: - anchor2 = Anchor(anchor) - anchor2.name = "bottom" -# anchor1.x += width - g.anchors.append(anchor2) + g.appendAnchor("bottom", anchor.position) -# anchor1 = Anchor(anchor) -# anchor1.name = "top" -# anchor1.x += width -# g.anchors.append(anchor1) +# g.appendAnchor("top", anchor.position) # if "rhotichook" == anchor.name: # g.appendAnchor(anchor.name, (anchor.x + width, anchor.y)) @@ -98,9 +92,7 @@ def copyMarkAnchors(f, g, srcname, width): break if anchor_parent_top: - anchor_top = Anchor(anchor_parent_top) - anchor_top.name = "top" - g.anchors.append(anchor_top) + g.appendAnchor("top", anchor_parent_top.position) def generateGlyph(f,gname,glyphList={}): |