Toggle through 1 set of alternates


Hi there

I'm looking to add a simple alternate feature to a font. The font is purely uppercase but in the lowercase glyphs the font has one set of of alternates (also uppercase design).

We're not after any cutting edge attempts at randomisation, just a simple toggle effect, cycling through so every other time you type a letter the alternate displays. So typing "aaaa" will pull out "aAaA" from the glyphs.

I have looked through a lot of posts and articles and have found much useful information, but can't quite pin down the exact code. I understand it's quite simple and I'm almost there I think. I have created two classes - class1 (uppercase) and class2 (lowercase).

Now I believe I just need a simple piece of code to place here in the opentype panel:

feature xxxx {

Calt limitations


Hi Guys,
I have a question for you. In this days, I try to make a pseudo-randomic typeface but, I note which I use maximum twelve step to change my code. It's true? Or is only my case?
Sequence: 125612 641342 615215

feature calt { # Contextual Alternates
# Latin
lookup calt1 {
sub @set_1 @set_1' by @set_2;
sub @set_2 @set_1' by @set_3;
sub @set_3 @set_1' by @set_4;
sub @set_4 @set_1' by @set_5;
sub @set_5 @set_1' by @set_6;
} calt1;

lookup calt2 {
sub @set_1 @set_2 @set_3' by @set_5;
sub @set_2 @set_5 @set_4' by @set_6;
sub @set_5 @set_6 @set_5' by @set_1;
sub @set_6 @set_1 @set_6' by @set_2;

lookup calt3 {
sub @set_1 @set_2 @set_1' by @set_6;
sub @set_2 @set_6 @set_2' by @set_4;

Contextual alternate feature – confusion



I have a font that i'd like to utilise the calt feature, and have found Thomas Phinney's article [], among others [] to be most helpful. YET I still can't get my head around writing the feature so that it creates a more 'random' outcome.

The details are:
– x3 variants for all characters
– x3 classes [00 / 01 / 02] including one of each character, 79 characters in total [A–Z, a–z, 0-9, punctuation]
– feature currently looks like:

feature calt {
lookup calt_one {
sub @set_00 @set_00' by @set_01;
sub @set_01 @set_00' by @set_02;
} calt_one;

lookup calt_two {
sub @set_02 @set_00' by @set_02;
sub @set_01 @set_02' by @set_00;
sub @set_01 @set_00' by @set_02;
sub @set_00 @set_01' by @set_02;

calt feature code


Working in FontLab, Windows.

We took multiple Type1 fonts and created a single family, generating as OTF for use in InDesign (mostly). There were 2 Greek Type1 fonts that were included into this single family. The width of the space in the Greek and Latin Type1 fonts were different, the Greek being larger to make flowing Greek more readable. We encoded the space from the Greek fonts to the PUA and used a simple calt feature to say that when the language is Greek and a Greek character is set, use the alternate space. Like so:

feature calt {
script grek;
sub @caltgrek space ' by space.grek;
sub @caltgrek semicolon ' by uni037E;
} calt;

where @caltgrek contains all the Greek characters after which we want to make a substitution.

Extra high initials only with salt.


Does anyone know of a way to enable special initial capitals only when 'salt' is selected? This is for a font that uses the 'salt' feature to produce extra high ascenders as for the first line of text. I know that I can simply include the substitutions for the extra high initial capitals in the 'salt' block, and then use a downstream 'calt' block to supress them whenever any of them might follow another upper case glyph, but that would require an enormous 'calt' block which I really want to avoid. If the OpenType formatt permitted an 'init' block to be subsumed inside a 'salt' block, this would be very easy, but unfortunately that is not permitted.

Contextual Alternates gone Wrong--or, Fun with Froggy Swash Tail.

Sometimes you just do stuff for fun and the learning process. Here is a first cut on what will become Froggy Swash. That flying frog tongue which leaps out some great distance and snatches an unassuming bug off a lilly pad was the motivation. Also, a little fun poked at {calt} use in this day and age.


"Segoe Script" Scripts list and calts


Is there anything odd in the calt list of Vista/Windows 7's font "Segoe Script"? I was alerted today by an InDesign user that contextual alternates do work for Latin script, but don't appear to get activated for Cyrillic text.

I examined the OTF tables, and, sure enough, the calt tables for Latin are only defined in the Latin Script part, and the Cyrillic Script section has its own calt list. Nothing out of the ordinary, I presume.

Theoretically, the used program ought to recognize a series of Cyrillic characters and automatically switch over to the Cyrillic section -- right? I think that was the entire purpose of the Scripts sections. Could it be an error in InDesign CS4? Or am I misinterpreting the use of the Script tags and how they would work in practice?