/// <summary>Checks if given glyph line at the given position matches given rule.</summary> /// <param name="line"/> /// <param name="rule"/> protected internal virtual bool CheckIfBacktrackContextMatch(GlyphLine line, ContextualSubstRule rule) { int j; OpenTableLookup.GlyphIndexer gidx = new OpenTableLookup.GlyphIndexer(); gidx.line = line; gidx.idx = line.idx; for (j = 0; j < rule.GetBacktrackContextLength(); ++j) { gidx.PreviousGlyph(openReader, lookupFlag); if (gidx.glyph == null || !rule.IsGlyphMatchesBacktrack(gidx.glyph.GetCode(), j)) { break; } } return(j == rule.GetBacktrackContextLength()); }
/// <summary>Checks if given glyph line at the given position matches given rule.</summary> /// <param name="line"/> /// <param name="rule"/> /// <param name="startIdx"/> protected internal virtual bool CheckIfLookaheadContextMatch(GlyphLine line, ContextualSubstRule rule, int startIdx) { int j; OpenTableLookup.GlyphIndexer gidx = new OpenTableLookup.GlyphIndexer(); gidx.line = line; gidx.idx = startIdx; for (j = 0; j < rule.GetLookaheadContextLength(); ++j) { gidx.NextGlyph(openReader, lookupFlag); if (gidx.glyph == null || !rule.IsGlyphMatchesLookahead(gidx.glyph.GetCode(), j)) { break; } } return(j == rule.GetLookaheadContextLength()); }
public SubTableLookup6Format3(OpenTypeFontTableReader openReader, int lookupFlag, SubTableLookup6Format3.SubstRuleFormat3 rule) : base(openReader, lookupFlag) { this.substitutionRule = rule; }