Package com.itextpdf.io.font.otf
Class OpenTableLookup
java.lang.Object
com.itextpdf.io.font.otf.OpenTableLookup
- Direct Known Subclasses:
-
GposLookupType1,GposLookupType2,GposLookupType4,GposLookupType5,GposLookupType6,GposLookupType7,GsubLookupType1,GsubLookupType2,GsubLookupType3,GsubLookupType4,GsubLookupType5
A Lookup table defines the specific conditions, type, and results of substitution or positioning actions that are used to implement a feature.
The data describing the actions of a lookup are contained in one or more lookup subtables. Different lookup types support different types of operation; for example, positioning adjustment on a single glyph versus positioning adjustments on pairs of glyphs.
For more information see Lookup table
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intIndicates to a text-processing client certain processing options to use when substituting or positioning glyphs.protected OpenTypeFontTableReaderOpenType font table reader.protected int[]Subtables locations. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedOpenTableLookup(OpenTypeFontTableReader openReader, int lookupFlag, int[] subTableLocations) Instantiates a new instance ofOpenTableLookup. -
Method Summary
Modifier and TypeMethodDescriptionintGetsthislookup table index in the LookupList.intGets the lookup flag.booleanhasSubstitution(int index) Checks whether there is a substitution (replacement) for the specified index inthislookup table.protected abstract voidreadSubTable(int subTableLocation) Reads subtable from the specified location.protected voidReads subtables.voidsetIndexInLookupList(int indexInLookupList) Sets lookup table index in the LookupList.booleantransformLine(GlyphLine line) Apply transformation to the glyph line.abstract booleantransformOne(GlyphLine line) Apply transformation to only one glyph from the glyph line.
-
Field Details
-
lookupFlag
protected int lookupFlagIndicates to a text-processing client certain processing options to use when substituting or positioning glyphs. -
subTableLocations
protected int[] subTableLocationsSubtables locations. -
openReader
OpenType font table reader.
-
-
Constructor Details
-
OpenTableLookup
protected OpenTableLookup(OpenTypeFontTableReader openReader, int lookupFlag, int[] subTableLocations) Instantiates a new instance ofOpenTableLookup.- Parameters:
-
openReader- the OpenType font table reader -
lookupFlag- the lookup flag -
subTableLocations- the subtables locations
-
-
Method Details
-
getLookupFlag
public int getLookupFlag()Gets the lookup flag.The flag indicates to a text-processing client certain processing options to use when substituting or positioning glyphs.
- Returns:
- the lookup flag
-
transformOne
Apply transformation to only one glyph from the glyph line.- Parameters:
-
line- the glyph line to transform - Returns:
-
trueif transformation was applied,falseotherwise
-
transformLine
Apply transformation to the glyph line.- Parameters:
-
line- the glyph line to transform - Returns:
-
trueif transformation was applied,falseotherwise
-
hasSubstitution
public boolean hasSubstitution(int index) Checks whether there is a substitution (replacement) for the specified index inthislookup table.- Parameters:
-
index- the index to check for a substitution - Returns:
-
trueif there is substitution,falseotherwise
-
readSubTables
Reads subtables.- Throws:
-
IOException- exception is thrown in case an I/O error occurs when reading subtables
-
readSubTable
Reads subtable from the specified location.- Parameters:
-
subTableLocation- the subtable location - Throws:
-
IOException- exception is thrown in case an I/O error occurs when reading subtable
-
getIndexInLookupList
public int getIndexInLookupList()Getsthislookup table index in the LookupList.- Returns:
- the table index in the LookupList
-
setIndexInLookupList
public void setIndexInLookupList(int indexInLookupList) Sets lookup table index in the LookupList.- Parameters:
-
indexInLookupList- the table index in the LookupList
-