Skip to content

Commit 8ceacde

Browse files
committed
Do not copy anchor points (for now)
Anchor points turn out to be more complex to copy: they rely on lookup subtables, which are hard to copy. We'll be refactoring this code to restore the ability to copy anchor points soon, but for now we'll just disable the feature.
1 parent 9adb346 commit 8ceacde

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/extractpoints.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -654,10 +654,11 @@ def copy_glyph(orig_glyph, new_glyph):
654654
for dot in dots:
655655
contour = circle_at(dot, size=args.radius)
656656
new_glyph.foreground += contour
657-
for anchor in orig_glyph.anchorPoints:
658-
new_glyph.addAnchorPoint(*anchor)
659-
# Or can we just do this?
660-
# new_glyph.anchorPoints = orig_glyph.anchorPoints
657+
# Commented out because lookup subtables need to be copied before anchor
658+
# points can be copied, and lookup subtables are a bit complex.
659+
# TODO: Implement copying lookup subtables, then uncomment this.
660+
#for anchor in orig_glyph.anchorPoints:
661+
# new_glyph.addAnchorPoint(*anchor)
661662
return new_glyph # Probably not needed as the font now contains it
662663

663664
def make_triangles(polygon_data, holes = None):

0 commit comments

Comments
 (0)