RoboFab

Support RoboFab

Up

See also

RoboFab Mailinglist

Join the RoboFab users community at Google groups.

Google Groups

Email:

Visit this group

RoboFab Sponsors

RoboFab Anchor

Usage

# robofab manual
#     Anchor object
#    usage examples

f = CurrentFont()
for c  in f:
    if len(c.anchors) > 0:
        print c, c.anchors
download examples/usageAnchor.py
< RGlyph for RoboFab Demo Font.A >
[< RAnchor for RoboFab Demo Font.A.anchors[0] >]

Description

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.

Attributes

Attribute examples

# robofab manual
#     Anchor object
#    attribute examples

c = CurrentGlyph()
if len(c.anchors) > 0:
    for a in c.anchors:
        print a.position
download examples/anchorAttributes.py

Methods

Method examples

# robofab manual
#     Font object
#    method examples

#method examples
download examples/anchorMethods.py