How to Link Stylistic Alternates in FontForge

Linking stylistic alternates to base glyphs in FontForge requires setting up OpenType Layout tables using the Glyph Substitution (GSUB) mechanism. By creating a Single Substitution lookup assigned to features like Stylistic Alternates (salt) or Stylistic Sets (ss01–ss20), you can map standard characters to their decorative or contextual variants so design software can switch between them seamlessly.

Step 1: Create and Name Your Alternate Glyphs

Before configuring the OpenType feature, ensure your alternate glyphs exist and follow standard naming conventions.

  1. Open your font project in FontForge.
  2. Create an empty glyph slot for your alternate (via Encoding > Add Unencoded Glyphs if needed).
  3. Draw or paste your alternate artwork into this slot.
  4. Open the glyph properties (Element > Glyph Info).
  5. Name the glyph logically relative to the base glyph. For example, if the base glyph is a, name the alternate a.alt (for a general stylistic alternate) or a.ss01 (for Stylistic Set 1).

Step 2: Create a GSUB Lookup

To define how the base glyph transforms into the alternate, you must configure a GSUB lookup table.

  1. Go to Element in the top menu and select Font Info.
  2. In the left navigation panel, select Lookups.
  3. Click the GSUB tab at the top of the Lookups window.
  4. Click Add Lookup.
  5. Set the Type dropdown to Single Substitution.
  6. Under the Feature column, choose your desired feature tag:
    • Select salt Stylistic Alternates for general alternates.
    • Select ss01 through ss20 if you want the alternate tied to a specific stylistic set.
  7. Click OK.

Step 3: Add a Subtable and Map Glyphs

A lookup requires a subtable to define the specific glyph-to-glyph relationships.

  1. Highlight the lookup you just created in the Lookups list.
  2. Click Add Subtable.
  3. Accept the default subtable name and click OK.
  4. In the subtable dialog, you will map the base glyphs to the alternate glyphs:
    • Manual Mapping: Click the Add button, enter the base glyph name (e.g., a) in the first column, and enter the alternate glyph name (e.g., a.alt) in the second column.
    • Automatic Mapping (Suffix Matching): If your glyphs use consistent suffixes (such as .alt or .ss01), click Populate with matching suffixes. Enter the suffix you used, and FontForge will automatically map all matching pairs.
  5. Click OK to close the subtable window, then click OK again to apply the changes in Font Info.

Step 4: Validate and Export

Test the OpenType substitution to ensure the mapping works correctly before publishing the font.

  1. Open the metrics window via Metrics > New Metrics Window.
  2. Type the base character into the text field.
  3. Open the Features menu within the metrics window and toggle the feature you created (salt or ss01). The base glyph should automatically switch to your alternate version.
  4. Go to File > Generate Fonts to export your font as an OpenType (OTF or TTF) file with layout tables enabled.