New to Typophile? Accounts are free, and easy to set up.
I have problem with automatic contextual replacement in InDesign f.e. with such code
sub space b' by b.alt;
it works only after usual or non-breaking space, but when after a 'emdash' is inserted thin space — the replacement not works automatically, then I must insert alternate manually via 'glyphs palette'. What can I do to resolve this problem? Or it's impossible?
6 Apr 2010 — 6:39am
you could write more code with the necessary lookups or switch your b and b.alt
6 Apr 2010 — 6:51am
'more code with the necessary lookups'
How exactly?
Switching alternates does not look as good decision because I already have about five alternatives for b in this font...
6 Apr 2010 — 7:47am
I think you better go by the reverse logic. Identify the beginning of a word not by presence of space but by absence of letters:
@anyLetter = [a b c ...];
ignore sub @anyLetter b';
sub b' b.alt;
This makes it easier to deal with different spaces, punctuation marks, numbers, currency symbols, math symbols, etc.
In case you do not want to see the b-to-b.alt replacement if, for example, a period precedes the word, then simply include period in the @anyLetter class.
6 Apr 2010 — 7:51am
Thank You, k.l., it's interesting idea :)