chiark / gitweb /
Sort elements of the FeatureIndices array by feature tag
The OpenType spec (version 1.9.1) says, "The FeatureRecord array
should be sorted alphabetically by feature tag." Bedstead was instead
emitting them in the order in which they appeared in the gsub_features
array, which was determined by the order the lookups need to occur in.
In particular, the 'cvXX' lookups need to occur after the 'ssXX'
lookups so as to override them properly.
Fixing this required some care to keep all the indices straight, but I
think I've managed it.