Table of Contents

Class ContextualTable<T>

Namespace
iText.IO.Font.Otf
Assembly
itext.io.dll
public abstract class ContextualTable<T> where T : ContextualRule

Type Parameters

T
Inheritance
ContextualTable<T>
Derived
Inherited Members

Constructors

ContextualTable(OpenTypeFontTableReader, int)

protected ContextualTable(OpenTypeFontTableReader openReader, int lookupFlag)

Parameters

openReader OpenTypeFontTableReader
lookupFlag int

Fields

lookupFlag

protected int lookupFlag

Field Value

int

openReader

protected OpenTypeFontTableReader openReader

Field Value

OpenTypeFontTableReader

Methods

CheckIfContextMatch(GlyphLine, T)

Checks if given glyph line matches given rule.

protected virtual int CheckIfContextMatch(GlyphLine line, T rule)

Parameters

line GlyphLine

glyph line to be checked

rule T

rule to be compared with a given glyph line

Returns

int

either index which corresponds to the last glyph of the matching context inside the glyph line if context matches, or -1 if context doesn't match

GetMatchingContextRule(GlyphLine)

Gets a most preferable context rule that matches the line at current position.

public virtual T GetMatchingContextRule(GlyphLine line)

Parameters

line GlyphLine

a line, which is to be checked if it matches some context.

Returns

T

matching context rule or null, if none was found.

Remarks

Gets a most preferable context rule that matches the line at current position. If no matching context rule is found, it returns null.

NOTE: if matching context rule is found, the GlyphLine.start and GlyphLine.end will be changed in such way that they will point at start and end of the matching context glyph sequence inside the glyph line.

GetSetOfRulesForStartGlyph(int)

Gets a set of rules, which start with given glyph id.

protected abstract IList<T> GetSetOfRulesForStartGlyph(int startId)

Parameters

startId int

id of the first glyph in the sequence

Returns

IList<T>

a list of ContextualSubstRule instances. The list will be empty if there are no rules that start with a given glyph id