Features panel»

The Features panel Window > Panels > Features helps you view, manage and edit the OpenType Features in your font.

The panel consists of: a local toolbar with a search field; a hamburger menu with options to import, export, and reset features, and to create the “kern,” “mark” and “mkmk” features; a pane to list features on the left, with buttons at the bottom to add and remove them; and a text pane on the right, which contains the feature definition code for the feature currently selected in the left pane.

Importing and Exporting Features»

To import features from an external file, click on the hamburger menu in the Features panel and select the Import Features File… option. This will bring up the standard Open File dialog, and you can choose any existing .fea file containing feature definitions or the font file in the vfb, vfc, vfj or ufo format. You can use this command to apply a previously created feature definition to the current font. During import FontLab automatically separates features into individual records and places the class definitions in the PREFIX section. You can also import features from the file using the File menu: File > Import > Features.

To import features into the current font from another opened font, click on the hamburger menu in the local toolbar and select the font in the Import Features submenu.

Using the import operations described above, you can import feature definitions that reference glyphs that are not present in the current font. If you compile the features after such an import, they will still compile (though there will be warnings in the Output panel about missing glyphs). Further, if you export such a font, only the features that reference glyphs currently in the font will be exported, i.e. features will be intelligently subsetted. This way, you use a larger, pre-defined feature definitions file, but FontLab will create only the features your font needs.

To export features to the fea file, choose the Export Features… option in the hamburger menu in the local toolbar. This will save the current set of feature definitions into a new text file with the extension .fea. This file can be imported to other fonts later. You can also export features using the File menu: File > Export > Features.

Adding Features»

To add a new feature, follow the following sequence of operations:

  1. Click on the + button at the bottom of the list of features (pane on the left). A new feature named xxxx will appear in the list and a generic feature definition will be posted to the feature editor (pane on the right):
feature xxxx {  
} xxxx;
  1. Change the name from xxxx to a real feature name in the editor. The list on the left will be updated automatically. Do not forget to make the ending name the same as the beginning name or the feature definition will not compile.

  2. Fill the feature body with lookups. See descriptions of all the types of lookups that FontLab can handle in the OpenType Features section. Please note that you may combine substitution and positioning lookups in the same feature.

  3. Click on the button to compile the feature definition code.

  4. Check the Output panel for warnings and errors. If there is an error, the line will be highlighted in the feature definition code. Fix any errors.

  5. When there are no errors, check the feature in the Glyph Window. Open the Contents sidebar, select the script and language and enter the test text using the Text tool.

To create or update the “kern” feature, use the Create [kern] Feature option from the hamburger menu in the local toolbar. This will generate the GPOS kerning based on the kerning pairs and classes you have defined.

To create the “mark” and “mkmk” features, use the Create [mark] and [mkmk] Feature option from the hamburger menu in the local toolbar. This will generate the “mark” and “mkmk” features based on the anchors you have placed in your font.

To view the global definition data, select PREFIX from the left panel. The global definition data, which is usually the definition of the glyph classes, will appear on the right.

Reordering Features»

The order in which OpenType features appear is important. For example, if you have the ligature feature and the small caps feature they must be applied only in this pre-defined order — first the small caps feature, and then the ligature feature — otherwise they will not work as desired.

To reorder features, simply drag-drop feature names in the list.

Compiling Feature Definitions»

When you import or create OpenType features, they are in the form of the text-based feature definition code, as seen in the panel. To convert them to the usable binary format of the GSUB and GPOS OpenType tables they must undergo a process called “compilation”. During compilation, the feature definition code is checked for errors and glyph references are verified. When everything is confirmed OK, the text is converted to binary form which you can preview or export in the final font.

To compile features, click on the button on the toolbar. FontLab will try to compile the features and if there are errors during the compilation they are put into the Output panel.

Once you have compiled your font, you have two instances of the same features: in the binary tables and in text form. Binary tables are modified when you compile the features. When you Reset Features, both the binary and text forms are removed. On export to the final font format, only the binary tables are exported. The text-based feature definition code is saved only in the vfb/vfj format or can be exported to a .fea file.

Removing Features»

To remove a feature, select it in the list and click on the - button at the bottom of the list.

To remove all features including binary compiled data, choose the Remove All Features command from the “hamburger” menu in the local toolbar.