Hello Typedrawers,
this is my first post, so beforehand I want to thank you all for the tremendous amount of information that can be found here.
I'm a graphic designer and over the last months I developed a script typeface. My approach was quite straightforward, I didn't want the typeface to be overly realistic and complex, all I wanted was to eliminate basic redundancies. I chose to replace letters A-Z and figures 0-9 with custom ligatures via the "liga" feature, in case they were repeated right next to each other. So if "99" is typed, it gets replaced by "99 ligature".
Everything works to my liking, but after adding superscript figures I ran into this problem:
As the "liga" feature replaces double figures (eg "99" with the "99 ligature"), these figures are not affected when activating the "sups" feature. Of course the "liga" feature could be turned off manually in the layout program, but that doesn't feel like a professional solution.
Being absolutely no coding-guy, I tried to break the ligatures apart in the "sups" code before exchanging them with the superscript figures like this:
feature sups {<br>sub nine_nine by nine nine;<br>sub @figures by @figuresSuperscript;<br>} sups;
This works in the Fontlab preview, but not in Indesign.
So what I want is:
When the "sups" feature gets activated, all figure-ligatures should be eliminated and replaced by the superscript figures (nine_nine -> ninesuperior ninesuperior), without having to turn off the "liga" feature.
What would be a nice way to achieve this? Thanks!
Comments
does not work: always keep in mind a subtable is processed only once, and the first match exits. Thus, since
nine_nine
matches, that next rule is never executed. This is similar to having ligatures/f_f
and/f_f_i
in the right order (FYI, there/f_f_i
must come first, OR you must have an explicit new table that changes/f_f /i
into/f_f_i
, which is computationally far less efficient).So, theoretically you could have tried adding a new subtable after the
/nine_nine
but on close inspection it seems that your first rule doesn't even fire... (your sups+liga still shows the liga form). As Robin's fix works, there must be something in InDesign that prevents this, although I cannot come up with any good reason.If my suspicion were correct, the same code might work fine in a non-Adobe app. Could try it in a web browser or something.
@Robin Mientjes What version of InDesign were you running, btw?
As for Theunis’s tests, it seems that the old rule of “f_f_i before f_i” isn’t valid anymore – it works either way, as the lookup is parsed as a whole, not line by line. It just means keeping your lookups straight – in general a healthy habit.
But smarter people can correct me on this, please.
https://adobe-type-tools.github.io/afdko/OpenTypeFeatureFileSpecification.html#5.d