Is there a more or less easy way to add more than 20 stylistic alternates to a single letter in a way that they would show up in Photoshop/Illustrator’s Alternates for Current Selection list (Glyphs panel). Can I use .altXX suffix and then use a lookup rule or something? If yes, what feature would be the best for the code to appear within?
Can I add alternates to .fina and .init glyphs? like .fina02 .init03? Would they appear in the Alternates for Current Selection list?
This sounds like a perfect fit for Character Variants features (cv01-cv99). You’d add all alternates for a letter (incl. related letters) in one feature like this:
sub a from [a.alt1 a.alt2 a.alt3 a.alt4];
sub aacute from [aacute.alt1 aacute.alt2 aacute.alt3 aacute.alt4];
etc.
I think the Glyphs panel in Adobe apps will offer them, but not 100% sure.
I’ve tried both ways: adding cvXX glyphs - they do appear in the Alternate Glyphs list in the Glyphs panel and adding the “sub xxx from [xxx]” rule to the salt feature - works as well.
What would be the best practice - adding cvXX glyphs or creating “sub xxx from xxx” rule using .altXX suffixes?
That depends on whether you have multiple alternatives for a glyphs or not. Character variants are designed to collect all variants of a glyph in one feature.
So this is correct:
# cv01:
sub a by a.alt;
# cv02:
sub b by b.alt;
and this is correct:
# cv01:
sub a from [a.alt1 a.alt2 a.alt3];
# cv02:
sub b from [b.alt1 b.alt2 b.alt3];
Makes sense.
What feature the code belongs to?
Can I create a lookup (if lookup needs to be created at all) in, lets say, salt feature and keep all my alternate letters there in “sub from” rules? Do I actually need the cvXX feature at all?
Thanks Florian! Adding sub/from in salt feature works well so I’ll stick to this option for now.
Alternatively, I’d create glyphs with .cvxx suffixes the same way as we create stylistic alternates - .ssxx glyphs. Then the CVXX feature would be added automatically and work just the way SSXX features work, I guess?
What confused me was that you’ve used separate cvXX features for different letters - cv01 for a and cv02 for b.
A single character variant (for example, cv01) enumerates all variants of that glyph. So if you have 3 alternative variants of a, they all go into the same feature:
The screenshot explains why you suggest adding them in separate features. Perhaps combining letters with the same number of alternates/forms.
I’ve never seen character variants panel (shame on me) - what application is this?
In case when you select an alternate from a dropdown list or from Glyphs panel (Alternates for Selection) in Photoshop/Illustrator - I guess, keeping all sub/from in one feature would work fine.
Affinity Designer. Apple’s apps also offer such a panel. Additionally, character variants are usable on the Web with CSS and in TeX with packages such as fontspec.
I would advise against putting unrelated glyphs in a single cv##. The OpenType spec says:
Whereas the Stylistic Set features assume recurring stylistic variations that apply to a broad set of Unicode characters, these features [cv01–cv99] are intended for scenarios in which particular characters have variations not applicable to a broad set of characters. The Stylistic Alternates feature provides access to glyph variants, but does not allow an application to control these on a character-by-character basis; the Character Variant features provide the greater granularity of control.