Page 1 of 1

Does opentype have this feature?

Posted: Tue Nov 16, 2021 12:48 am
by Kokokolode
Hello there, I'm wondering, is there a feature in the opentype designer where a glyph can have two or more variations?

So let's say I've the letter D and I want to have two different D's appear randomly across a paragraph, is this possible? Because I think having two or three variations of one letter in my font would be awesome, but I'm not sure if the feature exists or not :?: any help would be nice

thanks

Re: Does opentype have this feature?

Posted: Tue Nov 16, 2021 10:42 am
by PJMiller
This feature exists in the Open Type Specification. I'm not sure it's accessible through the Open Type Designer GUI in Font Creator but it will be accessible by writing the code for the feature in the code editor, you will have to do some hand coding.

Re: Does opentype have this feature?

Posted: Tue Nov 16, 2021 12:16 pm
by Bhikkhu Pesala
The Tutorial on OpenType Features does not include an example of Randomized Substitution.

Re: Does opentype have this feature?

Posted: Fri Dec 03, 2021 10:56 am
by LucasFonts
Real random was only possible in PostScript type 3 fonts, but those are history.
There are many ways to make a font look pseudo-random, for instance a rotation principle, where groups of glyphs rotate like 123123123123.
Ulrike Rausch has applied many features in her fonts, you can probably find one of her lectures online.
Here is an example of up to 24 rotating variants per letter:
feature calt {
sub @1 @1' by @2;
sub @1 @2 @1' by @3;
sub @1 @2 @3 @1' by @4;
sub @1 @2 @3 @4 @1' by @5;
sub @1 @2 @3 @4 @5 @1' by @6;
sub @1 @2 @3 @4 @5 @6 @1' by @7;
sub @1 @2 @3 @4 @5 @6 @7 @1' by @8;
sub @1 @2 @3 @4 @5 @6 @7 @8 @1' by @9;
sub @1 @2 @3 @4 @5 @6 @7 @8 @9 @1' by @10;
sub @1 @2 @3 @4 @5 @6 @7 @8 @9 @10 @1' by @11;
sub @1 @2 @3 @4 @5 @6 @7 @8 @9 @10 @11 @1' by @12;
sub @1 @2 @3 @4 @5 @6 @7 @8 @9 @10 @11 @12 @1' by @13;
sub @1 @2 @3 @4 @5 @6 @7 @8 @9 @10 @11 @12 @13 @1' by @14;
sub @1 @2 @3 @4 @5 @6 @7 @8 @9 @10 @11 @12 @13 @14 @1' by @15;
sub @1 @2 @3 @4 @5 @6 @7 @8 @9 @10 @11 @12 @13 @14 @15 @1' by @16;
sub @1 @2 @3 @4 @5 @6 @7 @8 @9 @10 @11 @12 @13 @14 @15 @16 @1' by @17;
sub @1 @2 @3 @4 @5 @6 @7 @8 @9 @10 @11 @12 @13 @14 @15 @16 @17 @1' by @18;
sub @1 @2 @3 @4 @5 @6 @7 @8 @9 @10 @11 @12 @13 @14 @15 @16 @17 @18 @1' by @19;
sub @1 @2 @3 @4 @5 @6 @7 @8 @9 @10 @11 @12 @13 @14 @15 @16 @17 @18 @19 @1' by @20;
sub @1 @2 @3 @4 @5 @6 @7 @8 @9 @10 @11 @12 @13 @14 @15 @16 @17 @18 @19 @20 @1' by @21;
sub @1 @2 @3 @4 @5 @6 @7 @8 @9 @10 @11 @12 @13 @14 @15 @16 @17 @18 @19 @20 @21 @1' by @22;
sub @1 @2 @3 @4 @5 @6 @7 @8 @9 @10 @11 @12 @13 @14 @15 @16 @17 @18 @19 @20 @21 @22 @1' by @23;
sub @1 @2 @3 @4 @5 @6 @7 @8 @9 @10 @11 @12 @13 @14 @15 @16 @17 @18 @19 @20 @21 @22 @23 @1' by @24;
} calt;