Exporting spin-off instances (SC, SS01, etc.)

I’m trying to adopt a script that Mekkablue wrote in order to automatically generate “Replace Glyphs” custom parameters for spin-off instances of my typeface (e.g., I’m trying to make a “SC Regular” instance identical to the “Regular” instance, except that the smcp feature is “always on”).

It does work, but I have the problem that ligatures and contextual alternates remain programmed as appropriate for the baseline font. I tried making .sc alternates for all lowercase ligatures and setting them to “do not export”, hoping that they would not be included in the liga feature when it was automatically recreated. Unfortunately, they apparently remain in use (according to the instance preview window).

Now, I suppose I could just recreate all of those ligatures as smallcaps and unnecessarily use them in the SC fonts. However, I would much prefer finding a way to remove them prior to export. Is there a Custom Parameter I should add to regenerate the liga feature? Or if the automatic liga feature is insensitive to non-exporting glyphs, could you help me add a line in my script to delete any .liga.sc beforehand?


OK, I think I’ve figured out a solution using “Remove Glyphs” as well as “Rename Glyphs”. :smile:

Adam Twardoch has a (non Glyphs app) tool which does exactly this and possibly simpler than your current proces.


just to make sure, if you rename glyphs, you do not need to remove the original glyphs first. so, if you are renaming a.ss01=a, you should not have remove a in your parameters.

but having set it up in the instances is much more convenient and also more flexible as the mentioned tool can only apply what is encoded with a feature. The build in solution is independent of the features.

@ Mekka: I needed the Remove functionality to get rid of the lowercase ligatures.

that is correct. What Rainer meant was not to remove the base glyphs…

Good, I’m not doing that. :smile:

OK, so I’ve belatedly figured out that I should offer an Italic to go with the Infant fonts, especially since the default Italic has Roman-style architecture for /g and /y and thus doesn’t work well as a replacement.

Now I’m running into the problem that if I replace the regular /g with /g.ss03 etc., the contextual alternate programming that keys off /g.ss03 etc no longer works. I suppose I need to replace either the .calt code or the class that I’m using for this particular replacement. Can I do this with custom parameters?


Replace glyphs: g.ss03=g

Components follow automatically.

That’s what I’m already doing, but then this no longer works:

Class «alike»:

    ... g.ss03 ...

Feature «calt»:

lookup aFillerPrepPrep {
    sub f' f t @alike by f.a;
} aFillerPrepPrep;

lookup aFillerPrep {
    sub f' [f t] @alike by f.a;
} aFillerPrep;

lookup aFiller {
    sub [t f]' @alike by [t.a f.a];
} aFiller;

(The first two lookups are there to ensure that things like /f/f/t/a are replaced by /f_f_t.liga.a/a. The automatic definition of the .liga feature won’t work with /f/f/t.a/a)

You can Replace Feature and Replace Class as well.

Nice! What’s the syntax of that? Can I replace one class with an existing other class, or do I have to overwrite its content with new content?

You specify the content, e.g.:

calt; sub f' @ascender by f.short;

So I have to provide the entire text of the CALT feature again, with my (small) changes implemented?

I’m assuming Replace Class works like that, too? “aLike; a adieresis …”? (EDIT: That doens’t seem to work, and neither does “@aLike; a dieresis …”)

EDIT: I got it to work with a combination of “Replace Feature” and “Remove Classes”. :slight_smile: Thanks!

Hmm, aLike; a adieresis should work.

for “Replace Feature” or “Replace Class” I can only replace multiple Features by using the same Parameter multiple times.
that is okay an keeps me not messing up.

but when coping three “Replace Feature” parameters to another instance, it only –for sure– copies only one parameter called “Replace Feature”.
that will not save me time I spend setting up all remove-replace-etc parameters I set up for one instance and want to scale to eight more weights/instance in my master-flile.

only option to keep all multiple custom parameters > copy&paste the whole instance, not only the parameters.
adding all “Replace Feature” in one paramenter like:
ordn; sub A by A.ordn; locl; script latn; sub @Uppercase germandbls’ @Uppercase by uni1E9E;
will not work

Is there an option to set a new “description” for instances with a new “familyName”?

Just put a description parameter in your instance. It will override the font-wide description.

I’ve had Jakob’s problem, too. I had to add in the second «Replace Feature» custom parameter into every instance by hand. It would be great if one could pack several features into the same «Replace Feature» string, as Jakob suggested.