What is "ignore context"?

Get help with FontCreator here. Please do not post feature requests or bug reports here.
Post Reply
Dan Kreider
Posts: 99
Joined: Thu Mar 25, 2021 8:35 pm

What is "ignore context"?

Post by Dan Kreider »

I have a particular lookup which was not working correctly, although the other lookups in the font were working correctly.

When I viewed this lookup in the Code Editor, I got the message at the end: "ignore context," twice. The code is below.

When I removed that portion from the code and re-export the font, the lookup worked correctly, but the rules lost their names, and reverted to Rule 1, Rule 2, etc.

Here is the code for the lookup, if it's helpful. Are there any other obvious syntax errors in the code? I would prefer not to lose the Rule labels I've created. Thanks for any insight anyone can offer.

Code: Select all

lookup 2stacks {
  context (@"superior (def) numerals") @"s3a input glyphs";
  sub 0 "num to stacked 2b";
  context (@"superior accidentals") @"superior accidentals";
  sub 0 "accidentals to 2b SS";
  context (@"superior (def) numerals") period_b.liga;
  sub 0 "Placeholder accidentals SS";
  context (@"superior (def) numerals") period_n.liga;
  sub 0 "Placeholder accidentals SS";
  context (@"superior (def) numerals") period_numbersign.liga;
  sub 0 "Placeholder accidentals SS";
  context (@"all glyphs for extender lines") equal;
  sub 0 "double-stack extender lines SS";
  context (equal_leader) equal;
  sub 0 "double-stack extender lines SS";
  context (@"all glyphs for extender lines") comma;
  sub 0 "double-stack extender lines SS";
  context (hyphen_2a) comma;
  sub 0 "double-stack extender lines SS";
  context (@"All 2b glyphs") hyphenminus;
  sub 0 "double-stack extender lines SS";
  context (hyphen_2b) hyphenminus;
  sub 0 "double-stack extender lines SS";
  context (hyphen_2b) @"all glyphs for extender lines";
  sub 0 "2b extender lines end SS";
  context (@"Nums and accidentals Grave") @"Nums and accidentals Superior";
  sub 0 "2b extender lines end SS";
  context (@"Nums and accidentals Superior") l;
  sub 0 "2stack lower lines L SS";
  context (@"All 2b glyphs") l;
  sub 0 "2stack upper lines L SS";
  context (equal_leader) l;
  sub 0 "2stack upper lines L SS";
  context (s2a.line) @"all glyphs for extender lines";
  sub 0 "num to stacked 2b";
  context (s2b.line) @"all glyphs for extender lines";
  sub 0 "2b extender lines end SS";
  context (@"all 2a glyphs") period;
  sub 0 "period to 2a hyphen";
  context (hyphen_2a) period;
  sub 0 "period to 2a hyphen";
  context (@"All 2b glyphs") period;
  sub 0 "period to 2b hyphen";
  context (hyphen_2b) period;
  sub 0 "period to 2b hyphen";
  ignore context;
  ignore context;
}
Dan Kreider
Music engraving and hymnal publishing
dankreider.com
hymnworks.com
Erwin Denissen
Moderator
Moderator
Posts: 11158
Joined: Fri Oct 04, 2002 12:41 am
Location: Bilthoven, The Netherlands
Contact:

Re: What is "ignore context"?

Post by Erwin Denissen »

The ignore context is used in our OTLFD feature syntax to define an exception to a rule and should be added before the actual rules.

It seems this lookup contains two empty/useless rules at the end. You can safely remove them through the user interface.
IgnoreContext.png
IgnoreContext.png (80.79 KiB) Viewed 1761 times
Erwin Denissen
High-Logic
Proven Font Technology
Dan Kreider
Posts: 99
Joined: Thu Mar 25, 2021 8:35 pm

Re: What is "ignore context"?

Post by Dan Kreider »

Thanks Erwin!
Dan Kreider
Music engraving and hymnal publishing
dankreider.com
hymnworks.com
Post Reply