Help with Ignore please

Hello :slight_smile:
I don’t use Ignore statements very often, so I’m not really sure what I’m doing. I looked at the OpenType cookbook and couldn’t find quite this example.

I want to make a ligature of three characters except following a couple of base consonants, where things need to be moved around a bit differently.

Here’s what I have in the code now:

lookup burmeseMedialLigs {
	lookupflag 0 UseMarkFilteringSet @myWaMedialHaMedial;
	ignore sub [myJha myRa] myYaMedial' myWaMedial' myHaMedial';
		sub myYaMedial myWaMedial myHaMedial by myYaMedial_myWaMedial_myHaMedial;
		} burmeseMedialLigs; 

I need the MarkFilteringSet as there could potentially be other irrelevant marks above the base, stored between the base and the medials. The problem is, I can’t compile this, so there must be something wrong with my ignore statement. How do I stop the ligature from forming after myJha and myRa?

I didn’t tried this but can you try the ignore without the tick marks?

Yes I tried that too, it won’t compile :frowning:

EDIT: it says Error: “Lookup type different from previous rules in this lookup block” in Feature calt in line: 14

that might be because you have an class in the ignore and a simple ligature substitution in the next line. Either have two ignores or use classes (with one glyph) in the ligature (if that even works).

You mean to have the myJha and myRa in separate lines? I tried that already too.

EDIT: adding the ticks in the ‘sub’ line works, it seems adding the ticks to the ignore means they have to be added everywhere in that lookup:

lookup burmeseMedialLigs {
lookupflag 0 UseMarkFilteringSet @myWaMedialHaMedial;
	ignore sub [myJha myRa] myYaMedial' myWaMedial' myHaMedial';
		sub myYaMedial' myWaMedial' myHaMedial' by myYaMedial_myWaMedial_myHaMedial;
		} burmeseMedialLigs;

I now have a different problem, though. The medial Ya is a spacing letter, but the medial Wa is a mark that needs to attach to the base. It can’t do that now, since it’s stored after the medial Ya. Is there any way to tell a mark which base to attach to?


1 Like

Is contextual decomposition not allowed? I can do:

sub myYaMedial_myWaMedial by myWaMedial myYaMedial; ## to reorder the glyphs

but I can’t do:

sub myJha myYaMedial_myWaMedial’ by myWaMedial myYaMedial;

As soon as I put a tick on the thing to be decomposed it stops working. I can do it with a chained lookup but just curious why this doesn’t work.

You need to decompose the line into a separate lookup:

lookup myYaMedial {
    sub myYaMedial_myWaMedial by myWaMedial myYaMedial;
} myYaMedial;

sub myJha myYaMedial_myWaMedial’ lookup myYaMedial;

something like this, the lookup needs to go to the prefix
(not tested, have written that in the browser)

1 Like

Yes, that’s precisely what I meant by ‘chained lookup’, it works fine. But I’m curious why it needs to be broken rather than just a one-line contextual decomposition.

That seems to be a limitation of makeOTF. The spec suggests that you can do it inline but makeOTF doesn’t like it.


Thanks, glad it’s not just me who found it strange. Will remember for next time :slight_smile: