Help needed: Opentype multiple characters substitution workaround ?!

kateliev's picture

Help needed: Opentype multiple characters substitution workaround ?!
Hi everybody,

I’m currently developing a revival of a cursive fat face, created by famous Bulgarian type designer Milka Peykova in the mid-70s. Her design was based on François Boltana’s Stilla, but feels a bit different (not to speak that it has complete Cyrillic character set, but no Latin, so it had to be ”interpolated/reimagined”). So as you all know the *F* *f* of Boltana’s script may cause some inconveniences, even in loose spacing, but Peykova’s design is much more tightly spaced. This creates a big disturbance in the font’s rhythm (ball terminal to next letter leaving a big hole...). So I had two choices, either to completely redesign the F,f (which didn’t wanted) or to rely heavily on f-ligatures (ff fi fl – being common and the uncommon fr ft fo fa fe fu fy …. etc.).

So to the problem…

After completing all the f-ligatures (plus all the Opentype coding) it all worked flawlessly until I faced another problem – (thus speaking a non-Latin language) I somehow “forgot” that combinations like ffo ffe ffu … etc. are possible.
So I created a f_component - being the first f in the ligature ff(sometnig), trying to achieve all the possible combinations trough coding – f_comp + (some already-made f-lifgature).

I know that the liga function allows substitution of the following:

sub A B C by D
sub A by B C D

but can somebody show me a workaround for the following

sub A B C by D E
sub f f f by f_component f_e

or do I have to make all the possible combinations again, thus creating many more new gliphs ?

Thank you in advance!

Khaled Hosny's picture

OpenType does not support many to many substitution, but you can use contextual substitutions to achieve similar effect, something like:

lookup f_1st {
  sub f by f_component;
} f_1st

lookup f_2nd {
  sub f by f_e;
} f_2nd;

feature calt { # or clig, support varies between engines
  sub f' lookup f_1st
      f' lookup f_2nd
} calt;

Which substitutes "fff" by "f_component f_e f".

kateliev's picture

@Hosny Thank you! I'll try that out!

I have a second question, currently I'm reading the following post a similar problem.

Could a ligature of ffe be achived in this way:
if I have already build up a ligature of fe (f+e), culd it be that..

feature clig {
sub f'fe by f_component;
} clig;

thus changing only the first f int the ffe to f_component?

Syndicate content Syndicate content