# robofab manual # Anchor object # usage examples f = CurrentFont() for g in f: if len(g.anchors) > 0: print g, g.anchors
< RGlyph for RoboFab Demo Font.A > [< RAnchor for RoboFab Demo Font.A.anchors >]
Anchors are single points in a glyph which are not part of a contour. Anchors have a name and a position, and they’re used as connection points for Components. In FontLab the anchors have a special appearance and can be edited. Anchors are stored in GLIF as single, named,
moveto‘s. i.e. any single, named
moveto in GLIF will become an anchor in FontLab. RoboFab’s own
font.generateGlyph() also uses the anchors to assemble the components.
The index of the anchor. (read only)
The position of the anchor
x position of the anchor.
y position of the anchor.
The name of the anchor.
# robofab manual # Anchor object # attribute examples g = CurrentGlyph() if len(g.anchors) > 0: for a in g.anchors: print a.position
Return a deepcopy of the object.
Move the anchor of the
(x,y). The relative coordinates of the
bcpOut will remain the same, which means that in fact, they move the same distance.
scale((x, y), center=(0, 0))¶
Scale the anchor.
Round the coordinates to whole integers.
Draw the object with a RoboFab segment pen.
Draw the object with a point pen. See how to use pens.
Transform this point. Use a Transform matrix object to mess with the point. See how to use transformations.
# robofab manual # Font object # method examples