The Features Panel

Use the Features panel to write and maintain the font's OpenType feature source. Work in a short loop: edit a rule, compile it, inspect diagnostics, and test text that should and should not trigger it.

Adding OpenType Features

Open Window > Panels > Features. The feature list selects the source shown in the syntax-highlighting editor.

The Features panel places the feature list beside its source editor.

The Features panel places the feature list beside its source editor. Here the selected locl feature contains script and language-specific lookup references.

PREFIX holds declarations shared by features, such as language systems, glyph classes, and standalone named lookups. FEATURES shows a combined read-only view. To change code, select its individual feature or PREFIX entry rather than editing that summary.

The source language is FEA, the Adobe feature-file syntax. Features group lookups, and lookups contain substitution or positioning rules; compilation produces the font’s GSUB and GPOS tables, as introduced in The Process Architecture and Authoring OpenType Layout. A feature block names a tag at its opening and closing:

feature ss01 {
    sub a by a.ss01;
} ss01;

This example requires both a and a.ss01 in the font. The name a.ss01 describes the replacement glyph; it is not created by the substitution rule.

Click + to add a feature. The menu offers common tags, entries that FontLab can generate from the glyph set, and an empty-feature route for a tag you will define yourself. Generated entries contain managed code; manual placeholders need rules before they do useful work.

Feature code is shared by the font's masters. A numeric positioning value written here is not automatically different in Light and Bold. Fixed literal positioning values supply one set of numbers, suitable for a single-master result. When values must vary, use master-specific visual kerning or anchors (see Kerning Visually and Attaching Marks), or supported parameter-based positioning. If separate hand-coded literal values are essential, produce separately configured single-master sources instead of assuming the shared text varies by master. Conditional substitution likewise needs its own variation conditions rather than separate feature text selected by the current master.

Writing, Compiling, and Testing

Type glyph names directly or press / in a code context to use Quick Find. Search by name or character identity, select a result, and insert its glyph name. In a comment or string, slash can remain literal rather than opening the chooser.

Hold Alt while pressing a glyph or class name to inspect its preview without leaving the editor. Cmd-click on macOS or Ctrl-click on Windows navigates to a glyph or class. The go-to control, also available with Cmd+L or Ctrl+L, follows the name at the cursor. These aids help catch the difference between a plausible name and a glyph actually present in the source.

Compile the current source

Click Compile features, or press Cmd+Enter on macOS or Ctrl+Enter on Windows. Then inspect the Output panel:

  • Notes provide information about compilation.
  • Warnings can leave a compiled result but identify behavior worth checking.
  • Errors or fatal errors mean the intended build has not completed successfully.

Fix errors before relying on the preview. A highlighted line can be where the parser noticed a problem rather than where it began; inspect a preceding block for missing braces, semicolons, or mismatched names.

A successful compilation here makes Features-panel code the source for the Glyph window, Preview panel, and font export. A later successful Compile in the Lookups panel selects its document instead. Compilation does not synchronize the two editable documents; use the transfer operations below when you want to carry changes between them.

The Missing Glyphs Used in Features dialog offers Ignore, Add Glyphs, and Update Features, with Flag new glyphs and Do not show this message anymore options. Decide whether the missing names are mistakes, drawings still to be made, or intentionally absent in a reduced font. Creating missing glyphs supplies cells, not finished designs. Ignoring missing references or updating the features for a reduced set can remove behavior, so inspect the resulting rules before treating the build as complete. Suppressing a repeated warning does not resolve the missing content. Recall the Output panel’s compiler-log role in Authoring OpenType Layout.

Test the text path

  1. Compile successfully after the latest edit.
  2. Enter ordinary test text in the Glyph window or Preview panel.
  3. Enable the intended feature in that view's Features selector.
  4. Choose the relevant Script and Language for a scoped feature.
  5. Compare the glyph sequence and spacing with the feature disabled, then test surrounding contexts and interacting features.

For the ss01 example above, type ordinary a characters. With ss01 enabled, they should display a.ss01; with it disabled, they should display a.

When two windows display different results, inspect their script, language, and feature controls separately; do not assume one selector synchronizes every preview. Directly inserting a.ss01 into a glyph display tests its drawing, not whether ss01 substitutes ordinary text correctly.

Include negative cases. A contextual alternate should remain absent where its context does not match. A localized form should not leak into an unintended language. Recompile after modifying source code; the compiled preview does not update simply because text in the editor changed.

Language Systems and Named Lookups

Put the required language-system declarations in PREFIX. For a simple Latin example:

languagesystem DFLT dflt;
languagesystem latn dflt;

DFLT and latn are script tags; dflt names the default language system. Use the exact case. Add the specific script/language systems your font supports before defining features that use them.

A named lookup gives a rule set an explicit identity that features can reference. This provides controlled reuse and ordering instead of relying on loose rules within a feature; the ordering consequences are taught in Substitution Lookups. The following is an alternative to the first ss01 example, not an additional feature definition. Put the standalone SetOne lookup in PREFIX and replace the existing ss01 feature’s rule with lookup SetOne;. The combined source then reads:

lookup SetOne {
    sub a by a.ss01;
} SetOne;

feature ss01 {
    lookup SetOne;
} ss01;

Define the lookup before referring to it. It can then be reused without copying its rule text into several features. A standalone lookup that is never connected to active feature processing does not become useful merely because it compiled.

For a larger project, include(filename.fea); can bring in another source file. A bare filename is searched relative to the font's saved location and the supported user/internal Features folders. Save the project in its intended location and keep the include files with it; an absolute path on one computer is not a portable project dependency.

Importing and Exporting Features

Use the panel menu's Import Features… to load supported feature sources, including .fea or .txt files and supported font sources. Copy Features From uses another open font. Confirm the source and review replacement/merge behavior before importing into a font that already has custom code.

Export Features… writes feature source to a .fea file. This is useful for version control or exchange, but the text alone is not the complete font: it depends on the glyph set, classes, includes, and any generated master data used to build it.

Importing authored FEA is different from decompiling an installed-font format. Decompilation reconstructs text from binary layout and need not reproduce the original source organization.

After reducing a glyph set, review all references. The missing-glyph workflow can update feature source from a compiled, subsetted result, but doing so can reorganize lookups and classes and discard your original comments or structure. Keep the authored source before that operation. Compare the feature roster and test representative text afterward, including features whose inputs were only partly retained.

Exchanging Code with Visual Lookups

Use the Lookups panel when you want to inspect the rule structure, edit supported rules visually, or trace a text run. Its document is independent of the text here. Opening it on an imported font starts from available binary layout tables; you do not have to recompile decompiled FEA merely to inspect that data. See The Lookups Panel for the visual editor and debugger workflow.

To replace visual data with code from Features:

  1. Finish the feature code you want to transfer. For a partial transfer, select the feature rows in the Features panel.
  2. Open the Lookups panel menu.
  3. Choose Import Selected Features from Features Panel to replace the selected feature assignments while retaining unrelated features and shared lookup definitions. Choose Import All Features from Features Panel to replace the whole Lookups document.
  4. Inspect the imported rules and test representative text. The import is undoable. It compiles the current code for conversion, including pending edits in Features, but does not publish a new font build.

A failed conversion leaves the visual document intact. Import All is a replacement operation; keep or copy visual work you intend to retain before using it.

To take visual work back to feature code, select the desired feature scope in Lookups and choose Copy feature or Copy features. Paste the FEA text into the Features panel or another editor. Selecting All features in the current scope copies that scope's feature set. Copy lookup or Copy lookups copies the selected definitions, including referenced dependencies; standalone lookup definitions can go in PREFIX and be referenced by a feature.

These clipboard operations generate FEA from the selected data. They do not reproduce an earlier author's comments or formatting, and they do not automatically replace the Features document. Check for existing declarations before pasting a second definition with the same name or feature tag. Compile in the Features panel when the pasted code is ready to supply normal previews and export.