Is it possible to set exceptions (ignore pos) in DIST OpenType feature? I tried to define the exception both as between classes and as an exception between class and a single glyph (look below) but in each way it doesn’t show any effects. I suppose the DIST feature doesn’t allow any exception, does it?
Why DIST? Because It is concerning Lao script, with some contextual cases of marks and following tall vowels.
(The given units are exaggerated in order to make the potential effect obvious).
The context in the ignore statement has to be different than in the actual pos statment. Otherwise it is not doing anything. Maybe you don’t need the ignore line?
Can you describe what exactly you want to do? Like: “it should replace xxx-lao with yyy-lao in front of zzz-lao, but not if it is preceded by aaa-lao”.
@GeorgSeifert, I forgot to include in this post the grounding main rule, from which to define the exceptions.
Shouldn’t be correct in general to set such main rule?
I also tried to omit the ignore line, but again there isn’t any effect.
@mekkablue, I mean a contextual repositioning, not substitution. All the base consonants could coexist with the tall vowels, but there are cases when few marks-above-the-bases (that should orthographically protrude to the ride) bring the necessity to set positive or negative kerning.
Firstly, I set similar rules in CALT feature and it gave me results. But Ben Mitchell gave me an advice to set it in DIST feature.
The previous syntax in CALT was such:
lookup KernGeneral {
# Avoid collisions between consonants + marks + tall vowels.
ignore pos AM.001' TV.001';
pos @laoBaseConsonants @laoAboveMarks 25 @laoTallVowels';
} KernGeneral;
lookup KernExcept {
# exceptions for the previous lookup
pos @laoBaseConsonant AM.001' 80 TV.001';
} KernExcept;
What I do not understand is why you want to use an ignore statement. It appears to be a situation for a simple contextual kerning to me. See the Contextual Kerning tutorial.
I’ll try to explain a little. Nikolay wants to kern all the tall vowels in different ways depending on the size of the above mark on the preceding base. But his design means there are some exceptions, when the marks are on different bases). So he’d like to exclude those bases from individual contextual kern lookups. Should ignore pos work? I’ve never seen it so not sure of the syntax.
I tried it in several ways (look below), sometimes within a lookup, sometimes outside it, and once again within a lookupflag 0.
But each time it did not give any outcome.
@GeorgSeifert, at this state the lookups aren’t set specifically for a language. I’ll try, but from the other side it is strange, how in Safari it gets properly rendered, isn’t?
Now I think I understand what you try to do with the Ignore statements. You would need it in the default dist lookup. But as this is generated automatically, this is not easily possible. So you add the contextual pos statement (and don’t forget the tick mark). And because the default kerning is already applied, you need to add or subtract that value from your code.
For “Indic” script it is generated automatically. I may have confused that. But you could put that in the kern feature, too.
if add a kern feature and put # Automatic Code End in the first line, you manually code will be inserted into the automatically gendered code. There is # Automatic Code Start if you need your code before the automatic code.