Ignore pos in DIST feature (exceptions)

All right, what you are speaking is logical. But this is what I get from the codes (each code proceeds the image that follows):

No KERN feature at whole

Version 1:

lookup laoKernsExcept3 {
		ignore pos [ngoNgu-lao soSeua-lao hoHaan-lao hoNo-lao hoMo-lao] maiTi-lao oVowel-lao';
		pos maiTi-lao oVowel-lao'  <220 0 220 0>;     
       	} laoKernsExcept3; 

Version 2:

lookup laoKernsExcept3 {
		ignore pos [ngoNgu-lao soSeua-lao hoHaan-lao hoNo-lao hoMo-lao] maiTi-lao oVowel-lao';
		pos [ngoNgu-lao soSeua-lao hoHaan-lao hoNo-lao hoMo-lao] maiTi-lao oVowel-lao'  <220 0 220 0>;     
       	} laoKernsExcept3;  

Version 3:

lookup laoKernsExcept3 {
    ignore pos @laoBaseKernSiteSpecif maiTi-lao oVowel-lao'; 		
	pos ngoNgu-lao maiTi-lao oVowel-lao'  <120 0 120 0>;
    } laoKernsExcept3;  

where @laoBaseKernSiteSpecif = [ngoNgu-lao and other glyphs ];

Version 4:

lookup laoKernsExcept3 {
		pos ngoNgu-lao maiTi-lao oVowel-lao'  <120 0 120 0>;
        ignore pos @laoBaseKernSiteSpecif maiTi-lao oVowel-lao';        
       	} laoKernsExcept3;    

where @laoBaseKernSiteSpecif = [ngoNgu-lao and other glyphs ];

If the last code — Version 4 — is wrong, why do I get the right results from it?

Please try to understand how ignores work, it’s as though you’re not reading our explanations and just trying random code to see what works.

You use an ignore statement before a section of code so that the code is skipped in certain contexts.

Version 1 is doing exactly what you want, except that the positioning values are not right. The oVowel is being pushed away in the first situation, by exactly the amount that you specify (220 units). This is of course too much. You’ve told the font to ignore this adjustment after ngoNgu, which is why the oVowel is crashing into the maiTi.

In version 2, you’re asking the font to ignore any following lookups containing ngoNgu and others, but the following lookup ONLY includes ngoNgu and the others, so nothing will happen.

In version 3, you’re doing the same as in version 2, except you’re using a class So you’re asking the font to ignore all the situations where one of the bases in that class precedes a maiTi and an oVowel. That means the following GPOS lookup won’t be read.

In version 4, the ignore will not have any effect as there’s no lookup following it for the ignore to apply to. The GPOS adjustment in the first line is moving the oVowel after maiTi on a ngoNgu, which is exactly what you see.

1 Like

Right, I thought initially when defining an ignore statement I could later add new values to the ignored ones. But at any case every new line afterwards gets ignored. Therefore, the solution I see is to avoid ignore and use only additional repositioning values (positive and negative), right? At least it gives me visual outcome that suits the design.

Thank you guys for your explanations and support, I appreciate it!

Yes, that would work.

Note also if your anchors are all aligned above the right-side stems of the base consonants, there won’t be exceptions to the kern lookups, as the overhang will be the same on any base.

2 Likes

Yes, you have right. Indeed, they are quite a few places to set an exception. And most of them were with maiTi.

Thanks again!

4 posts were split to a new topic: ‘App is Damaged and Can’t be Opened’ error

I stumbled upon sth similar now. Not sure if this is the right approach. For a coding font where I implement contextual spacing, I am pushing two periods together a bit .., but I want to do that only if not followed by a < (like so ..<).

I cannot find the syntax for that. This is where I am stuck at:

lookup doubledot {
	ignore pos period period less';
	pos period <PUSH_2_R> period <PUSH_2_L>;
} doubledot;

But that is not correct, the ignore line spits errors at me no matter what I try. I think it needs to be similar to the pos rule, but the point is that I want to ignore the less after the 2 periods.
(I defined the value records in the prefix, those work and are not the issue)

And then secondly, I want to reposition the dots in that triple combination ..<, how would be the syntax for that? It seems I can only move 2 glyphs in a rule at a time?

Similar case: two bars || but ignore 3 bars ||| or <|||

It’s not urgent, but I’d love to know for understanding, I seem to push the case a little far here, sorry for that.

Has anyone an idea?

The position of the tick marks does not make sense to me. What about:

lookup doubledot {
	ignore pos period' period' less;
	pos period' <PUSH_2_R> period' <PUSH_2_L>;
} doubledot;

You are totally right! That did not make sense at all. Your version works perfectly. Thank you.

1 Like