Constructing Glyphs with Named Anchors

Use named anchor pairs to place components relative to one another. Begin with the attachment model in Anchors for Positioning, then specify the receiving and attaching names in a recipe.

Construction Grammar for Anchors

In modern Glyph Construction syntax, an anchor name is another argument to @:

aacute = a + acutecomb@top

To try this construction, first create and position top in a and _top in acutecomb. Open Font > Build Glyphs… > Custom, turn off Use simple (FLS5) syntax, and enter the recipe. Review the generation options before building; if aacute already exists, rebuilding replaces its current content.

Here FontLab aligns the mark's _top with the base's top. Built-in alias.dat recipes use this same @top relationship: the rule, recipe, and designer-placed anchors cooperate in one construction mechanism. Inspect the resulting accent position against those two source points. The recipe still names both components. In an auto-layer recipe field, enter the construction with the leading syntax marker, for example = a + acutecomb@top.

Use matching, deliberately placed anchors in both sources. A missing name can lead to another named-position fallback or an incomplete result; a plausible-looking accent is not proof that the intended anchor pair was found.

Choose a particular attachment pair

When several base positions need the same mark anchor, an explicit mapping can identify both names:

ligature.marked = f_i + acutecomb@top_2[_top]

This aligns the mark's literal _top to top_2 in f_i. The source ligature must contain that anchor. The bracket form belongs to modern Glyph Construction syntax, not the legacy FLS5 syntax. Plain @top is the usual pairing represented explicitly by @top[_top]. Mapping the names separately avoids adding a helper _top_2 anchor to every mark used on a numbered ligature. Such a helper would also enter generated mark features, so an explicit mapping avoids that unwanted extra attachment name. The same notation can make a construction clearer than depending on whichever matching name is encountered first.

A later component normally refers to the preceding component. To return to an earlier base, name it explicitly before the position, such as @f_i:top_1[_top]. This matters when placing more than one mark around a ligature rather than stacking every mark on the last one.

Anchors in the built glyph

Attaching a mark consumes the two anchors used for the match: they no longer appear as that pair in the built glyph. Other anchors remain available, and a mark can pass the attachment onward when it contains a matching pair of its own.

For example, top and _top share the same root, top. They form a propagation channel, and the root also determines which marks appear in an Anchor Cloud; that preview is taught in Attaching Marks. If the mark attaches through _top, its outgoing top takes the target anchor's name at the outgoing anchor's transformed position. With @top_2[_top], that outgoing anchor becomes top_2. Without the outgoing partner, the consumed target is not recreated. The channel can work in either direction; top and _bottom do not form a matching-root pair.

This supports stacking:

=A+ringcomb@top+acutecomb@top

The ring needs _top for its incoming attachment and top for the acute above it. The outgoing replacement occupies the consumed target's place in the anchor order. Other inherited anchors retain their source order. A built glyph can consequently provide attachment points when used in another construction.

The rules apply to a one-time recipe build as well as to an auto layer. The one-time build receives the anchors when it is built; an auto layer re-evaluates the construction as its sources change. Append #?noanchors when the built glyph should receive no anchors from the recipe. This leaves the source anchors intact.

For an advanced mapping, either bracketed name can have an underscore. Suppose shadda-ar has top and _top, and kasratan-ar has _bottom and bottom. The construction =shadda-ar+kasratan-ar@_top[_bottom] places the kasratan below the shadda. The kasratan's bottom/_bottom channel passes the target name through: its outgoing bottom reappears as _top at the bottom of the stack. For this example, the recommended, better-positioned construction is =fathatan-ar+shadda-ar@top, using the equivalent top-mark shape. Both recipes require the stated source anchors; the names alone cannot supply them.

Use anchors when adding a component

In Glyph > Add Component…, blank placement fields permit automatic positioning, including matching anchors. Enter an anchor name in the X or Y placement field to request that named reference for the corresponding axis. Numeric fields still request numeric placement, so you can combine one coordinate with one anchor-based axis deliberately.

After adding, inspect the component's offset and its Anchored property. Ordinary initial placement computes a position once. Enabling Element > Anchored, the paper-clip control, or the corresponding Elements-panel state keeps eligible component placement controlled by the source anchors.

For a live Anchored component, FontLab collects available base-anchor names from the host and preceding components. Later preceding components can replace an earlier candidate of the same name; the mark's anchor order determines which available pair is chosen. Component order and anchor order therefore both matter.

The first base component can sit at the origin when there is no applicable host attachment. Later components need suitable reference information for the intended match; inspect the enabled attachment state instead of assuming every component can be anchored usefully. Move the controlling anchor to reposition an anchored component rather than trying to drag it freely.

Chain ligature components

Special #exit and #entry anchors can define the connection between successive base components. Put #exit in the first source and #entry in the next, then use a concatenating recipe such as:

f_i = f & i

The anchor-aware construction can align entry to exit instead of relying only on accumulated advances. Check the realized placement and attachment state; in a manual composite, enable Anchored where the chain should remain attached. These special anchors are construction references here, not instructions for generating a layout feature.

Built-in alias.dat recipes can use the same named-attachment mechanism. Their availability does not remove the need to provide the source glyphs and appropriate anchors. The recipe supplies membership and placement instructions; the anchor supplies the design-controlled point.

Offset an Explicit Attachment

A recipe can apply independent horizontal and vertical offsets after matching explicitly named anchors. A leading glyph selector applies to both coordinates unless another selector overrides it. Check the result on transformed components and in italic fonts, where an apparent horizontal or vertical move can be harder to judge. The offset does not replace the recipe’s anchor-consumption and passthrough rules.