Feature request: Reorder OT features in edit view according to definition

I’m going to start to publicly write down feature requests here for documentation purposes. Sometimes I write Georg emails privately but I think it’s better to have these conversations in the open. This is my first one, but more will follow.

On topic:
People who work on fonts a lot know by heart the order in which OpenType features are defined:

Then please use that same order in the menu in the edit view, where they are currently sorted alphabetically.
There is absolutely no good reason for the alphabetic order. They are not defined alphabetically in the font, and they are not applied alphabetically by the shaping engine, so please display them in the same order as I’ve defined them so that I can find them easily.

Having to apply an alphabetic logic when searching for features in the menu is cumbersome and breaks the concentration and work flow.

What is the actual proper ordering?

Your question is ambiguous. I’ll try:

The order in which the features are executed by the shaping engine is very much defined by the shaping engine (below Harfbuzz):


So instead of using the order defined in the font, it runs features in the order it deems necessary, meaning that the order of features in the font is largely irrelevant.

But there is room for custom ordering. All features that fall under “User-selected discretionary features” (bottom of pic) are run in the order in which they are defined in the font. This is liga, dlig, stylistic sets and so on. So in summary it’s a mixture of irrelevant and relevant.

I’m asking that features are sorted in the menu in the same way they are defined in the source file so that it won’t break my concentration looking for them because I know the defined order by heart.

When you have an empty font and press the “Update” button. The features are added in a predefined order (the Latin features need a certain order based on the code and the Indic features are added in the order as defined in the spec (hopefully).
When you press the Update button later, it will keep the order.

The FeatureRecord array is arranged alphabetically by FeatureTag names. (from OpenType layout common table formats (OpenType 1.9) - Typography | Microsoft Learn)

The popup is populated from the feature table from an intermediate .otf font. In previous versions it would use the order of features from Font Info > Features but that was not working well when there are features defined in prefixes or included files.

We are looking into this

FWIW, features are sorted alphabetically in the binary font OpenType layout common table formats (OpenType 1.9) - Typography | Microsoft Learn (it is lookups that keeps the order of definition).

1 Like