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.
- Open your project in FontForge.
- Verify or create your target ordinal glyphs:
- Spanish/Portuguese style:
ordfeminine(ª, UnicodeU+00AA) andordmasculine(º, UnicodeU+00BA). - English style (optional custom glyphs): Variants
such as
s.ordn,t.ordn,n.ordn,d.ordn,r.ordn,h.ordn.
- Spanish/Portuguese style:
- 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
- Go to the top menu and select Element > Font Info.
- In the sidebar of the Font Info dialog, click Lookups.
- Select the GSUB tab at the top to access glyph substitution tables.
3. Create the Ordinals Feature Lookup
- Click the Add Lookup button on the right side.
- In the Type drop-down menu, select Single Substitution.
- Under the Feature column, click the empty field or
dropdown and select or type
ordn(Ordinals). - In the Scripts & Languages box, add the writing
systems you wish to support (e.g.,
latnwith default languagedflt). - Click OK.
4. Add a Subtable and Map the Glyphs
- Ensure your new
ordnlookup is selected in the list, then click Add Subtable. - Accept the default subtable name or give it a custom name, then click OK.
- 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.,
ordfeminineora.ordn). - Repeat this process for
omapped toordmasculine(oro.ordn), as well as any other letters you have drawn ordinals for.
- Click in the Base Glyph Name column and enter the
standard character (e.g.,
- Alternatively, if your glyphs share a consistent naming convention
(like
aanda.ordn), select Populate and enter the extension.ordnto generate the mappings automatically. - Click OK to close the subtable window, then click OK again to exit Font Info.
5. Generate and Test the Font
- Navigate to File > Generate Fonts.
- Select OpenType (CFF) or TrueType, and click Generate.
- 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 like1aor1oand enabling the Ordinals feature.