My Version is 11.5 and please help!
For example,
a b -> c b;
a b c -> d b c.
How to substitute a character depending on the one or two after it?
-
- Top Typographer
- Posts: 9878
- Joined: Tue Oct 29, 2002 5:28 am
- Location: Seven Kings, London UK
- Contact:
Re: How to substitute a character depending on the one or two after it?
Moved to support
It is hard to understand why you need this. Please explain.
Perhaps the Randomize Feature will be of interest to you?
It is hard to understand why you need this. Please explain.
Perhaps the Randomize Feature will be of interest to you?
-
- Moderator
- Posts: 11160
- Joined: Fri Oct 04, 2002 12:41 am
- Location: Bilthoven, The Netherlands
- Contact:
Re: How to substitute a character depending on the one or two after it?
You need a chained context substitution and single substitution lookups as shown here: A basic script that you can import looks like:
Code: Select all
script latn {
feature ContextualAlternates1;
}
feature ContextualAlternates1 calt {
lookup ChainingContext1;
}
lookup ChainingContext1 {
context a (b c);
sub 0 SingleSubstitution1;
context a (b);
sub 0 SingleSubstitution2;
}
lookup SingleSubstitution1 {
sub a -> d;
}
lookup SingleSubstitution2 {
sub a -> c;
}
Re: How to substitute a character depending on the one or two after it?
Oh thanks a lot! (๑•̀ㅂ•́)و✧
Re: How to substitute a character depending on the one or two after it?
And what should I do if I want to do like this:
a <any characters> b c -> a <any characters> d c
a <any characters> b c -> a <any characters> d c