How to Add Ordinal Indicators in FontForge

This guide provides a straightforward walkthrough for implementing the OpenType Ordinals (ordn) feature in FontForge. You will learn how to prepare your ordinal glyphs, create a Glyph Substitution (GSUB) lookup, map base characters to their raised ordinal counterparts, and export a fully functional OpenType font that correctly handles ordinal formatting in modern design and word-processing applications.

1. Prepare Your Ordinal Glyphs

Before configuring the OpenType feature, ensure your font contains the necessary raised glyphs.

  1. Open your project in FontForge.
  2. Verify or create your target ordinal glyphs:
    • Spanish/Portuguese style: ordfeminine (ª, Unicode U+00AA) and ordmasculine (º, Unicode U+00BA).
    • English style (optional custom glyphs): Variants such as s.ordn, t.ordn, n.ordn, d.ordn, r.ordn, h.ordn.
  3. Draw or scale these characters down to the appropriate superior size, position them at the cap height or ascender line, and ensure their side bearings are properly spaced.

2. Open the Lookups Window

  1. Go to the top menu and select Element > Font Info.
  2. In the sidebar of the Font Info dialog, click Lookups.
  3. Select the GSUB tab at the top to access glyph substitution tables.

3. Create the Ordinals Feature Lookup

  1. Click the Add Lookup button on the right side.
  2. In the Type drop-down menu, select Single Substitution.
  3. Under the Feature column, click the empty field or dropdown and select or type ordn (Ordinals).
  4. In the Scripts & Languages box, add the writing systems you wish to support (e.g., latn with default language dflt).
  5. Click OK.

4. Add a Subtable and Map the Glyphs

  1. Ensure your new ordn lookup is selected in the list, then click Add Subtable.
  2. Accept the default subtable name or give it a custom name, then click OK.
  3. In the subtable mapping window, map the base glyphs to their ordinal counterparts:
    • Click in the Base Glyph Name column and enter the standard character (e.g., a).
    • Click in the Replacement Glyph Name column and enter the ordinal character (e.g., ordfeminine or a.ordn).
    • Repeat this process for o mapped to ordmasculine (or o.ordn), as well as any other letters you have drawn ordinals for.
  4. Alternatively, if your glyphs share a consistent naming convention (like a and a.ordn), select Populate and enter the extension .ordn to generate the mappings automatically.
  5. Click OK to close the subtable window, then click OK again to exit Font Info.

5. Generate and Test the Font

  1. Navigate to File > Generate Fonts.
  2. Select OpenType (CFF) or TrueType, and click Generate.
  3. Test your font in an application that supports OpenType features (such as Adobe InDesign, Illustrator, or web browsers using CSS font-feature-settings: "ordn";) by typing text like 1a or 1o and enabling the Ordinals feature.