summaryrefslogtreecommitdiff
path: root/scripts/lib/fontbuild
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/fontbuild')
-rw-r--r--scripts/lib/fontbuild/anchors.py6
-rw-r--r--scripts/lib/fontbuild/generateGlyph.py14
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={}):