Diacritic Positioning on Base Glyphs in FontForge

Handling diacritic positioning relative to base characters in FontForge is primarily accomplished through OpenType Mark-to-Base (mark) positioning features using anchor points, or through the assembly of precomposed glyphs. This guide covers how to configure OpenType anchor classes, place anchor points on both base characters and diacritical marks, fine-tune their alignment, and generate precomposed accented glyphs for broader legacy software compatibility.

1. Create a Mark-to-Base Lookup

To dynamically place diacritics above or below base characters, you must first define an OpenType GPOS (Glyph Positioning) feature.

  1. Open your font project in FontForge.
  2. Go to Element > Font Info.
  3. Select Lookups from the left-hand menu, then choose the GPOS tab.
  4. Click Add Lookup.
  5. Set the Type dropdown to Mark to Base Positioning.
  6. Under the feature list, select or enter mark (Mark Positioning). Click OK.
  7. With the new lookup selected, click Add Subtable.
  8. Name the subtable and click OK. FontForge will then open the Anchor Control window.

2. Define an Anchor Class

Inside the Anchor Control setup, you define the reference points that link base glyphs to mark glyphs.

  1. In the subtable dialog, click New Anchor Class.
  2. Name the anchor class based on its placement (for example, top for accents above letters, or bottom for accents below letters).
  3. Ensure the lookup subtable is saved and close the Font Info window.

3. Add Anchor Points to Base Glyphs

Once the class is established, you need to mark where diacritics should attach to your base characters (such as a, e, n).

  1. Double-click a base glyph to open the Glyph Outline window.
  2. Go to Point > Add Anchor.
  3. Select the anchor class you created (e.g., top).
  4. Set the Type to Base Glyph.
  5. Click OK. A point marked with the anchor name will appear in the glyph canvas.
  6. Drag the anchor point to the exact location where you want the diacritic to center or attach (typically centered horizontally above the glyph's x-height or cap-height).

4. Add Anchor Points to Mark Glyphs

You must mirror this process on the diacritic glyphs (such as acute, grave, tilde, or cedilla) so FontForge knows which point on the accent aligns with the base anchor.

  1. Open the diacritic glyph in the Glyph Outline window.
  2. Go to Point > Add Anchor.
  3. Select the corresponding anchor class (e.g., top).
  4. Set the Type to Mark Glyph.
  5. Position the anchor point on the accent where it should meet the base anchor point (for a top accent, this is usually at the bottom-center of the mark).

5. Preview and Fine-Tune Alignment

To verify that the accents align properly across different base characters:

  1. Open the Metrics window by navigating to Metrics > New Metrics Window.
  2. Type a base glyph followed by a combining diacritic (e.g., e followed by Unicode U+0301 for a combining acute accent).
  3. Verify that the mark attaches correctly to the base glyph.
  4. If adjustments are needed, go back to the subtable in Font Info > Lookups > GPOS, select the subtable, and click Edit Subtable to access the visual Anchor Control matrix, where you can nudge anchor offsets for specific glyph pairs.

6. Alternative: Building Precomposed Glyphs

If your font needs to support environments that do not fully implement OpenType GPOS positioning, build precomposed Unicode characters (such as é - U+00E9):

  1. Ensure the base glyph (e) and the standalone mark (acute) exist in your font.
  2. If anchors are already placed, select the target precomposed slot (e.g., eacute).
  3. Navigate to Element > Build > Build Accented Glyph (or press Ctrl + Shift + A).
  4. FontForge will automatically insert references to the base and mark glyphs and position the accent according to the anchor coordinates you defined.