'Thin space' in OT-feature calt.

Primary tabs

5 posts / 0 new
Last post
Henadij Zarechnjuk's picture
Joined: 5 Oct 2005 - 3:51am
'Thin space' in OT-feature calt.
0

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?

j's picture
j
Offline
Joined: 30 Jul 2004 - 1:49pm
0

you could write more code with the necessary lookups or switch your b and b.alt

Henadij Zarechnjuk's picture
Joined: 5 Oct 2005 - 3:51am
0

'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...

Karsten Luecke's picture
Offline
Joined: 6 Aug 2005 - 8:41am
0

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.

Henadij Zarechnjuk's picture
Joined: 5 Oct 2005 - 3:51am
0

Thank You, k.l., it's interesting idea :)