Feature code editor

OpenType feature code lives in Font Info on the Features tab (alongside General, Names, Axes, Stations, Instances, and Custom OT Values). The editor is more than a text buffer: it combines syntax-aware editing with shaping preview, glyph search, and feature-order visualization so you can see how code affects rendering.

Write substitutions, positioning rules, class definitions, prefixes, and feature blocks there. Search for a glyph name to highlight every use in rules and classes. That is the fastest way to see the substitution and positioning chain for a character, check class membership, and find a bad reference without scanning the whole file.

The Prefixes, Classes and Features headings in the sidebar each have a + button that adds an item and a − button that deletes the selected one. Right-click an item for Rename…, Duplicate and Delete…. You can also rename an item with a double-click, or by selecting it and pressing Enter. Each of these changes is one undo step.

Prefix and class names follow the feature-file rules: they start with a letter, “” or “.”, and contain only letters, digits, “”, “.” and “-”. Two classes, or two prefixes, can’t share a name. When you rename a class that other code uses, the editor offers to update every @name reference in your prefixes, classes and features in the same step. Comments are left as they are.

A feature’s tag is its name, such as liga or ss01. When you add or rename a feature, type a tag or pick one from the list of registered tags. The field checks the tag as you type. A tag longer than 4 characters, or with characters other than letters, digits, “_”, “.” and “-”, can’t be used. A lowercase tag that isn’t in the OpenType registry, or a deprecated one, shows a warning and offers the closest registered tag when there is one; you can still use it. A tag with an uppercase letter, such as ABCD, is a custom feature. A font can have several features with the same tag, so a tag already in use isn’t flagged. A feature whose tag has a warning or an error also shows an icon in the list and a note above its code.

You can edit code only when an item is selected and it isn’t marked as automatic. With nothing selected, as in a new font, or with automatic code selected, the code is read-only. The Automatically Generated switch appears only for code that Counterpunch writes, such as the ccmp and smcp blocks from a skill; turn it off to edit the code. Code that only the source file marks as automatic (Glyphs.app does this) shows a note instead: Glyphs rebuilds that code when it opens the file, and Counterpunch doesn’t. Keep my code removes the mark, so that you can edit the code and Glyphs keeps your version. To mark code as automatic for Glyphs, right-click it and choose Mark as automatic for Glyphs. Deleting a generated block while Counterpunch manages automatic features asks first, because Counterpunch would add it again after the next glyph change, and offers to turn Automatically Generated off instead.

The sidebar shaper control chooses an engine such as HarfBuzz and shows the order that engine will apply features. Different shapers can order features differently. Use that list when text does not look the same across environments, or when you suspect a feature-order conflict.

A debugging loop that works: search the problematic glyph, check the active shaper and feature order, verify classes, then try another shaper if the issue looks platform-specific. If a compile error appears, the message usually names a line. Fix that line, compile again, then search the glyph you were shaping.