Is there any argument
against using the same code for switching glyphs in two features (rvrn and rlig)?
To be clear I am using this kind of substitution only on default (currency) glyphs, so rvrn should not cause problems (if I understand
this argument correctly).
I wanted to use just rlig, but unfortunately, Adobe Illustraotor seems to ignore rlig right now.
Comments
rvrn
a -> b
rlig
a -> b
that would be fine, because if the rvrn feature substitution has already been applied, the rlig feature would do nothing. But if you had
rvrn
a -> b
b -> c
rlig
a -> b
b -> c
the output of the rvrn substitution would be affected by the rlig feature.
From a user perspective, features are a mechanism for indicating typographic intent. From the text layout engine perspective, they are a control mechanism for indicating which actions are to be applied over what spans of the text. The layout engine can scan the formatting on runs to see, for a given character, which features are activated and, then based on that, it builds a list of which actions are to be applied. But actions are never added to the list twice.
Btw, note that rlig and rvrn have different intended purposes: rlig for creating required ligatures (like Arabic lam-alef), and rvrn for substituting glyphs in a variable font contingent on selected axis values. The rlig feature can also have axis conditions in a variable font, however.
To be clear, ‘action’ in this case means ‘lookup’? In that case, there could presumably be a difference in outcome if
a) the same lookup were associated with both features
vs
b) the same glyph substitutions were in separate lookups associated with respective features
In the first case, would the layout engine apply the lookup only once, on the basis that the features are specifying the same action?
Oh, how I wish this stuff was actually specified.
Indeed!
Font makers, on the other hand, are often creative, and run into conflict with these (sometimes implicit) intentions, or better said, limitations.
Some “hacks” they employ are not useful or welcome in the longer perspective. But often, the font makers’ intentions are so genuine and important (because they contribute a creative mechanism or solve a real need of some community), that it should be the format designers and text engineers who relax on the original assumptions.