Create Mark-to-Base Anchors in FontForge
Creating anchor points for mark-to-base positioning in FontForge allows combining marks, such as diacritics and accents, to align accurately over base glyphs across different font sizes and rendering environments. This guide walks through configuring the GPOS lookup table, defining anchor classes, placing base and mark points within your glyphs, and previewing the final alignment.
Step 1: Set Up the GPOS Lookup and Subtable
Before placing anchor points, you must create a Mark-to-Base lookup in your font's metadata:
- Open your font file in FontForge.
- Navigate to Element > Font Info.
- Select Lookups from the left-hand menu, then click the GPOS tab.
- Click Add Lookup.
- Set the Type to Mark to Base Positioning.
- Under the Feature column, select or type
mark(Mark Positioning), then click OK. - Select the newly created lookup and click Add Subtable.
- In the subtable dialog, add an anchor class (for example, name it
Topfor top accents orBottomfor under-base accents). Click OK to save and exit the Font Info dialog.
Step 2: Add Anchor Points to Base Glyphs
Once the anchor class is established, attach base anchors to your standard characters:
- Double-click a base glyph (such as
aorn) to open the Glyph Edit window. - Navigate to Point > Add Anchor.
- In the dialog, set the Class to your defined class
(e.g.,
Top). - Set the Type to Base.
- Click OK. An anchor point labeled with your class name will appear on the canvas.
- Drag the anchor point to the exact visual position where the diacritic should rest above the character (typically centered horizontally slightly above the glyph's cap height or x-height).
Step 3: Add Anchor Points to Mark Glyphs
Next, place corresponding mark anchors on your diacritic glyphs:
- Double-click the corresponding diacritic glyph (such as
acutecombortildecomb). - Verify that the glyph is recognized as a mark by going to Element > Glyph Info, navigating to the Features tab, and ensuring the glyph class is set to Mark.
- Navigate to Point > Add Anchor.
- Set the Class to match the base glyph's class
(e.g.,
Top). - Set the Type to Mark.
- Click OK.
- Drag this anchor point to the attachment reference point of the diacritic (usually centered at the bottom of the accent). When rendered, FontForge lines up the mark's anchor directly over the base's anchor.
Step 4: Preview and Adjust
Verify that your mark-to-base anchors function properly:
- Open the Metrics window by going to Metrics > New Metrics Window.
- Type the base glyph followed by the combining mark.
- Observe whether the accent snaps to the intended position above the base character.
- If the alignment is off, reopen either glyph edit window and drag the anchor point until the desired visual balance is achieved in the Metrics window.