lookupflag IgnoreMarks in FontLab not working in output font

Thomas Phinney's picture

I've been working on a mildly complex font for a client (moonlighting outside my day job).

I've never worked with using a lookupflag to ignore certain glyphs, but it seems like the perfect solution for a particular issue I encountered. So I tried to do it in FontLab. It compiled fine and I export the font, but the desired behavior is not occurring in InDesign CS5 (even when I set text with the WorldReady Composer active).

I'm wondering if I am doing something wrong, or...? Here's my process.

A) First, for the glyphs we want to be ignored, do the following in the FontLab glyph window:
- select the glyph.
- bring up the glyph properties dialog
- change the value of the OT popdown from "Unassigned" to "Mark"

B) For EACH AND EVERY lookup we need the glyph to not interfere with, we need to add one line that reads "lookupflag IgnoreMarks ;" and goes right after the lookup is declared and before the substitution code, like this:

lookupflag IgnoreMarks ;
sub glyph' [a e i o u] by glyph.alt ;

C) In FontLab prefs, go to "Generating OpenType and TrueType" and make sure to check "Generate GDEF table"! This is critical because the glyphs being indicated as "Marks" are stored in the GDEF table and without that, it all won't work.

Am I missing something?


Khaled Hosny's picture

If the glyphs you want to ignore are not combining marks, then you should be using MarkAttachmentType (or the new, mostly unsupported, UseMarkFilteringSet), otherwise no idea why IgnoreMarks is not working for you (but I don't use FontLab). You can also write the GDEF table directly in the feature file, if it makes any difference.

Edit: Another idea, but I'm not really sure, but I think the lookupflage should go the feature block itself, so try:

feature calt {
lookupflag IgnoreMarks;
} calt;

k.l.'s picture

My first guess was that FLS5 would not generate GDEF properly, but it does. Maybe WRC expects that not only mark glyphs are covered in GDEF as such, but base glyphs need to be explicitly covered too?

Thomas Phinney's picture

Khaled: Given that there are only two glyphs I want to ignore, and 1500 I want to NOT ignore, I am not sure MarkAttachmentType makes sense. At least, not given what the feature file syntax has to say about it:

To skip over all mark glyphs except for those of mark class @TOP_MARKS:

lookupflag MarkAttachmentType @TOP_MARKS;

The class name used with MarkAttachmentType can be either a regular glyph class name or a mark class name. The glyph sets of the referenced classes must not overlap, and the MarkAttachmentType statement can reference at most 15 different classes.

Karsten: Yes, at first I didn't think it would work, but then I saw it quite explicitly documented in the FontLab manual, and I got it to compile fairly easily....

Khaled Hosny's picture

I see, then may be using 'ignore' keyword is a better choice, but it largely depends on how complex your actual substitution.

Syndicate content Syndicate content