iText 9.8.0 API
iText.IO.Font.Otf.GlyphPositioningTableReader Class Reference

Parses an OpenTypeFont file and reads the Glyph Substitution Table. More...

Inheritance diagram for iText.IO.Font.Otf.GlyphPositioningTableReader:
iText.IO.Font.Otf.OpenTypeFontTableReader

Public Member Functions

  GlyphPositioningTableReader (RandomAccessFileOrArray rf, int gposTableLocation, OpenTypeGdefTableReader gdef, IDictionary< int, Glyph > indexGlyphMap, int unitsPerEm)
  Instantiates a new instance of GlyphPositioningTableReader. More...
 
- Public Member Functions inherited from iText.IO.Font.Otf.OpenTypeFontTableReader
virtual Glyph  GetGlyph (int index)
  Returns the glyph by index. More...
 
virtual OpenTableLookup  GetLookupTable (int idx)
  Returns the lookup table. More...
 
virtual IList< ScriptRecord >  GetScriptRecords ()
  Returns the script records. More...
 
virtual IList< FeatureRecord >  GetFeatureRecords ()
  Returns the feature records. More...
 
virtual IList< FeatureRecord >  GetFeatures (String[] scripts, String language)
  Returns the features represented by FeatureRecord list. More...
 
virtual IList< FeatureRecord >  GetSpecificFeatures (IList< FeatureRecord > features, String[] specific)
  Returns the specific features represented by FeatureRecord list. More...
 
virtual FeatureRecord  GetRequiredFeature (String[] scripts, String language)
  Returns the required feature represented by FeatureRecord. More...
 
virtual IList< OpenTableLookup >  GetLookups (FeatureRecord[] features)
  Returns the lookups. More...
 
virtual IList< OpenTableLookup >  GetLookups (FeatureRecord feature)
  Returns the lookups. More...
 
virtual bool  IsSkip (int glyph, int lookupFlag)
  Checks if lookup must ignore the specified glyph when processing glyph sequences. More...
 
virtual int  GetGlyphClass (int glyphCode)
  Returns the glyph class. More...
 
virtual int  GetUnitsPerEm ()
  Returns the units per em. More...
 
virtual LanguageRecord  GetLanguageRecord (String otfScriptTag)
  Returns the language record. More...
 
virtual LanguageRecord  GetLanguageRecord (String otfScriptTag, String langTag)
  Returns the language record. More...
 

Package Functions

override OpenTableLookup  ReadLookupTable (int lookupType, int lookupFlag, int[] subTableLocations)
  Reads the lookup table from OpenType data. More...
 
- Package Functions inherited from iText.IO.Font.Otf.OpenTypeFontTableReader
  OpenTypeFontTableReader (RandomAccessFileOrArray rf, int tableLocation, OpenTypeGdefTableReader gdef, IDictionary< int, Glyph > indexGlyphMap, int unitsPerEm)
  Creates a new reader. More...
 
OtfClass  ReadClassDefinition (int classLocation)
  Reads the class definition from OpenType data. More...
 
int[]  ReadUShortArray (int size, int location)
  Reads the ushort array from OpenType data. More...
 
int[]  ReadUShortArray (int size)
  Reads the ushort array from OpenType data. More...
 
virtual void  ReadCoverages (int[] locations, IList< ICollection< int >> coverage)
  Reads the coverages from OpenType data. More...
 
IList< int >  ReadCoverageFormat (int coverageLocation)
  Reads the coverage format from OpenType data. More...
 
virtual SubstLookupRecord[]  ReadSubstLookupRecords (int substCount)
  Reads the substitution lookup records from OpenType data. More...
 
virtual PosLookupRecord[]  ReadPosLookupRecords (int substCount)
  Reads the positioning lookup records from OpenType data. More...
 
virtual TagAndLocation[]  ReadTagAndLocations (int baseLocation)
  Reads the tag and locations from OpenType data. More...
 

Additional Inherited Members

- Package Attributes inherited from iText.IO.Font.Otf.OpenTypeFontTableReader
readonly RandomAccessFileOrArray  rf
 
readonly int  tableLocation
  Stores table location. More...
 
IList< OpenTableLookup >  lookupList
  Stores lookup list. More...
 
OpenTypeScript  scriptsType
  Stores scripts type. More...
 
OpenTypeFeature  featuresType
  Stores features type. More...
 

Detailed Description

Parses an OpenTypeFont file and reads the Glyph Substitution Table.

Parses an OpenTypeFont file and reads the Glyph Substitution Table. This table governs how two or more Glyphs should be merged to a single Glyph. This is especially useful for Asian languages like Bangla, Hindi, etc.

This has been written according to the OpenTypeFont specifications. See the OpenType GPOS table.

Constructor & Destructor Documentation

◆ GlyphPositioningTableReader()

iText.IO.Font.Otf.GlyphPositioningTableReader.GlyphPositioningTableReader ( RandomAccessFileOrArray  rf,
int  gposTableLocation,
OpenTypeGdefTableReader  gdef,
IDictionary< int, Glyph >  indexGlyphMap,
int  unitsPerEm 
)
inline

Instantiates a new instance of GlyphPositioningTableReader.

Parameters
rf the RandomAccessFileOrArray containing the OpenType font
gposTableLocation the GPOS table location
gdef the GDEF table reader
indexGlyphMap the glyph index to glyph map
unitsPerEm the head.unitsPerEm value from the OpenType font

Member Function Documentation

◆ ReadLookupTable()

override OpenTableLookup iText.IO.Font.Otf.GlyphPositioningTableReader.ReadLookupTable ( int  lookupType,
int  lookupFlag,
int[]  subTableLocations 
)
inlinepackagevirtual

Reads the lookup table from OpenType data.

Parameters
lookupType the lookup type
lookupFlag specifies processing options, e.g. whether to skip base glyphs, marks or ligatures during glyph substitution or positioning. See Lookup table
subTableLocations the sub table locations
Returns
the lookup table

Implements iText.IO.Font.Otf.OpenTypeFontTableReader.