Hi, I am working on a variable font with two axes (width and slant). I made alternative shape for particular glyph, it is working on a glyphs variable font preview, also I tested it on a website and it works fine, but it is not working on Adobe Illustrator, can anyone help?
Thanks
Glyphs uses the rlig
feature tag for this by default, which is wrong because itâs meant to be used for ligatures, not variation alternates. Maybe they chose it for better compatibility, but Illustrator doesnât support it.
Luckily you can change it with these instructions from the Switching Shapes tutorial:
You just need to set it to rvrn
which is the correct feature tag for required variation alternates. This is supported in browsers and Adobe apps.
However there still are some potential problems with using rvrn
as noted in the tutorial, but to solve that you would need to create your alternate glyphs separately and write your own feature code, which would look something like this:
#ifdef VARIABLE
condition slnt < -4.731;
sub a by a.italic;
sub aacute by aacute.italic;
sub acircumflex by acircumflex.italic;
sub adieresis by adieresis.italic;
sub agrave by agrave.italic;
sub aring by aring.italic;
sub atilde by atilde.italic;
sub ae by ae.italic;
sub b by b.italic;
sub d by d.italic;
sub e by e.italic;
sub eacute by eacute.italic;
sub ecircumflex by ecircumflex.italic;
sub edieresis by edieresis.italic;
sub egrave by egrave.italic;
sub f by f.italic;
sub g by g.italic;
sub k by k.italic;
sub l by l.italic;
sub m by m.italic;
sub n by n.italic;
sub ntilde by ntilde.italic;
sub p by p.italic;
sub q by q.italic;
sub r by r.italic;
sub u by u.italic;
sub uacute by uacute.italic;
sub ucircumflex by ucircumflex.italic;
sub udieresis by udieresis.italic;
sub ugrave by ugrave.italic;
sub y by y.italic;
sub yacute by yacute.italic;
sub ycircumflex by ycircumflex.italic;
sub ydieresis by ydieresis.italic;
sub ygrave by ygrave.italic;
sub ampersand by ampersand.italic;
#endif
And then what you can do is copy that code into multiple tags like rvrn
and rlig
so that it applies across any apps that support either tag.
You can put feature variations in any feature. The reason why we do not recommend rvrn
is that it is only for default glyphs:
Typically, a Feature table referenced in a FeatureRecord with the ârvrnâ tag will have LookupCount set to 0; in this way, the default variation instance does not have any glyph substitution applied but, rather, uses default glyphs.
It will not work for substituted glyphs like small caps or stylistic sets. In that case, you will have to put it in those features, not rvrn
. rlig
is more broadly supported, but it seems like AIâs implementation is incomplete.
That is not correct. The rvrn
feature is meant for some special purpose that nobody actually could explain to me. It does apply the feature variation as does every other feature. Yes, you can add feature variation to all features. Even stylistic sets. The rvrn
feature has one big problem. As defined in the spec, it is applied before all other features. So it is only possible to have variations for encoded glyphs. But not for small caps, stylistic sets âŚ
As I said before, any feature can hold feature variation. So we need to find a feature that is active by default and that allows us to control the time when it is applied. That leaves rlig
and rclt
. Both do work in Adobe apps â but they sometimes decide to forget that.
Iâm not very good with feature code, but a glyph can be substituted multiple times, right? I donât understand why rvrn
canât be used with non-encoded glyphs. Could you not simply write rvrn: sub a by a.italic
and then ss01: sub a.italic by a.italic.ss01
?
rlig
and rclt
are not always supported in Adobe apps. Only rvrn
has universal support in my tests:
Illustrator 26
rclt
rlig
rvrn
InDesign 17
rclt
rlig
rvrn
Photoshop 23
rclt
rlig
rvrn
Chrome 100
rclt
rlig
rvrn
Safari 15.3
rclt
rlig
rvrn
Firefox 99
rclt
rlig
rvrn
rlig works as such as a normal ligature feature:
And a variable font with feature variations:
The setup in glyphs:
And a few instances in Illustrator:
So it works perfectly for me. As I said, it forgets that it can do this sometimes. There seems to be something in the font that Illustrator doesnât like and it stops to apply the feature variations.
I did the same test with Feature for Feature Variations = rclt
and it still works.
Indesign doesnât seem to support rclt
.
HI, thank you all for your help. I tried both versions, Alternate layers (âbracket layersâ) and Alternate glyphs. I also tried rclt
rlig
rvrn
, nothing seems to work. I will try to explain it with screens so it is more clear what I mean, because at this point I donât know what I have to do.
this are the glyphs I want to switch âtar-georgianâ to âtar-georgian-boldâ
Maybe I am doing something wrong, or missing some step
Why have an a.italic
at all then, and not make it the default? Because it would always trigger in rvrn
.
No, the solution is to add the condition to ss01
. There is no point in forcing it into rvrn
.
How do you know it doesnât work? How do you test? If in Illustrator: can you try in FontGoggles or a web browser first? Just to exclude bad implementations in AI.
Thats the problem, it works everywhere except Adobe illustrator, and unfortunately Illustrator is the program that I need it for.
The condition would be in rvrn
in my example â I should have mentioned it, but I thought it was implied by the italic scenario. This makes more sense to me than having multiple conditions in different tags:
[rvrn]
#ifdef VARIABLE
condition slnt < -4.731;
sub a by a.italic;
#endif
[ss01] #automatically generated by Glyphs
sub a.italic by a.italic.ss01;
However, now that Iâve tested this, it works in FontGoggles and on the web, but the ss01 substitution does not trigger in Illustrator.
Can you send me the file? Iâll have a look why it doesnât work in Illustrator.
When I export the font from the latest glyphs it works fine for me in Illustrator. I disabled all the ârvrnâ and ârcltâ feature. I installed the font in â/Library/Application Support/Adobe/Fonts/Tests/CaveaPlusVariableVF.ttfâ. My Illustrator version is 26.1
What is the actual version number?
I will set up the new glyphs file and test it, thank you so much for your help
By the way, I was running into frustrations with rlig
in Illustrator, and found that it only works for me when I am using the âMiddle Easternâ line composer (in Version 26.1 and Version 27). To activate that, I had to go to Illustrator Preferences, then Type, then go into the Paragraph panel and its flyout options.
It seems wild that itâs this difficult to activate such a seemingly basic featureâŚ