Make 3 from 2

I wonder if there is any OT-feature, that can fill a certain glyph between two others. This would be something like that if one types »AB« the feature makes »A*B« of it. (while * is the certain extra glyph).

From my point of knowledge one can only sub the same number of glyphs. My weird problem would add something in between though. Is this possible at all?

We had a discussion about something similar some time ago. In a nutshell, you cannot directly insert, but you can do a one-to-many substitution first:

sub A by A zerowidthspace;
sub B by B zerowidthspace;
sub C by C zerowidthspace;

… and then do a contextual substitution afterwards:

sub [A C] zerowidthspace’ [B D] by asterisk;

And in the brackets, you’ll just add all the glyphs between which the asterisk should appear. Perhaps you will need to put those two parts in separate lookups:

lookup FIRST {
sub A by A zerowidthspace;
sub B by B zerowidthspace;
sub C by C zerowidthspace;

lookup SECOND {
sub [A C] zerowidthspace’ [B D] by asterisk;

But in your case, wouldn’t a simple A_B.liga ligature (showing the asterisk in the middle) be the better substitution?

mekkablue, you code-wizard ( :slight_smile: ), this looks really delicious at first glance. i will check this afterwards. thank you in advance!

you are generally right with the ligature. but i actually abstracted my certain problem a bit. it is much more confusing and does not work with ligatures.

Be warned that the one to many substitution only work in InDesign CS 5 and later.

also a good point to know, georg. thank you!

Is there any special trick with one-to-many substitution? It works on Glyphs but I can’t make it work on on Indesign CS6.

PS. Sorry for reopen this very old thread.

You have to activate the Word Ready (or Global) composer in Indesign.