Page 1 of 1

question about contextual chaining context

Posted: Fri Dec 16, 2016 7:02 pm
by Dennis
I'm creating a distressed all caps font and would like to use a chaining context table for the first time to simulate an automated substitution. Each lowercase letter will have 3 alternates. For example (a= a.alt1, a.alt2, a.alt3)

My goal is twofold:

1. For alternate glyphs to cycle in place of letters keyed multiple times. If you were to key the word "Mississipi" for example all 4 lowercase s would be different. s, s.alt1, s.alt2, s.alt3

2. For single letters to cycle sequentially in an automated process. If you were to key "run run run" you would get r/u/n/space/r.alt2/u.alt2/n.alt/2/space/r.alt3/u.alt3/n.alt3

here's a screen shot from a font that does this successfully

Image

I've experimented with an existing DEMO font by examining the code and trying out the subtables and substitutions on my font. My first goal is partially accomplished but stops at the 2nd alternate glyph. So if you were to key "ssss" you'd get s, s.alt1, s.alt2, s. I've also tried adding classes to the existing subtables and that partially solves my 2nd goal but completely ruins the first.

I'm beating my brain trying to figure out how this all works and haven't had any luck searching for anything on the web. I just don't completely understand the process or why certain glyphs are in certain classes.

If there's a good way to do this from scratch I'd love to hear (or even a good tutorial somewhere) Thanks.

Re: question about contextual chaining context

Posted: Fri Dec 16, 2016 11:47 pm
by Bhikkhu Pesala
Do you have a font that behaves in this way? It sounds like a complex and uncommon requirement to me. Maybe the Randomize feature would be easier? This was my first guess, and seems to work OK.
  1. Add a Randomize feature
  2. Add an alternate substitution for a -> a a.alt1 a.alt2 a.alt3
  3. I used a -> a b c d
Random Substitution.png
Random Substitution.png (7.04 KiB) Viewed 2859 times
When the user enables the Randomize feature, the text changes randomly, like this:-

Randomised Alternate Substituion.png
Randomised Alternate Substituion.png (12.42 KiB) Viewed 2859 times

Re: question about contextual chaining context

Posted: Sat Dec 17, 2016 1:58 am
by Dennis
Bhikkhu,

I'll be happy to share the font with you. Check your email.
Thanks for the info on the randomize feature. I gave it a try and couldn't get it to work. It would only substitute the first alternate I plugged in. :cry:

Image

Re: question about contextual chaining context

Posted: Sat Dec 17, 2016 7:33 am
by Bhikkhu Pesala
There's no way that I can see of testing the randomize feature in FontCreator. The Preview Toolbar will let you cycle through the alternates by scrolling the set on the toolbar but I had to test the font in PagePlus.
Randomize.png
Randomize.png (5.98 KiB) Viewed 2847 times
You can look at the code for the font that you sent me in the code editor, but rather you than me working out how to use that.
Chaining Context 1.png
Chaining Context 1.png (50.65 KiB) Viewed 2848 times

Re: question about contextual chaining context

Posted: Sat Dec 17, 2016 11:35 am
by Erwin Denissen
Bhikkhu Pesala wrote:There's no way that I can see of testing the randomize feature in FontCreator.
Currently FontCreator doesn't show how the random feature could work, but we can add such support.
Bhikkhu Pesala wrote:The Preview Toolbar will let you cycle through the alternates by scrolling the set on the toolbar but I had to test the font in PagePlus.
Even though you can't see it working in FontCreator, it will work in software that has implemented the Random feature.

Does PagePlus use "random" or does it step through the sequence of alternates?

Re: question about contextual chaining context

Posted: Sat Dec 17, 2016 1:00 pm
by Bhikkhu Pesala
Erwin Denissen wrote:Does PagePlus use "random" or does it step through the sequence of alternates?
It looks fairly random to me. PagePlus offers the four alternate sets to choose from, and each gives a different, but apparently random result. It's obviously not random though, as if you delete and retype the text, it gives the same result. Here is a more extensive test set.
Random Alternates.png
Random Alternates.png (21.64 KiB) Viewed 2835 times

Re: question about contextual chaining context

Posted: Tue Dec 20, 2016 6:22 pm
by Bhikkhu Pesala
Erwin Denissen wrote:Currently FontCreator doesn't show how the random feature could work, but we can add such support.
The latest update (build 2265) has added support for displaying the results of the Randomize feature in the Preview toolbar and OpenType Designer.

How's that for quick service? :)