From 3ce1b056a9dad26b32e3d7ffcf5d2299977465d4 Mon Sep 17 00:00:00 2001 From: James Godfrey-Kittle Date: Wed, 17 Jun 2015 17:04:37 -0700 Subject: Revise updated scripts to run without FontLab. --- scripts/lib/fontbuild/anchors.py | 6 +++--- scripts/lib/fontbuild/generateGlyph.py | 14 +++----------- 2 files changed, 6 insertions(+), 14 deletions(-) (limited to 'scripts/lib') 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={}): -- cgit v1.2.3