Package com.itextpdf.text.pdf.fonts.otf
Class GlyphSubstitutionTableReader
- java.lang.Object
-
- com.itextpdf.text.pdf.fonts.otf.OpenTypeFontTableReader
-
- com.itextpdf.text.pdf.fonts.otf.GlyphSubstitutionTableReader
-
public class GlyphSubstitutionTableReader extends OpenTypeFontTableReader
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. This may be found here.
- Author:
- Palash Ray
-
-
Field Summary
-
Fields inherited from class com.itextpdf.text.pdf.fonts.otf.OpenTypeFontTableReader
LOG, rf, tableLocation
-
-
Constructor Summary
Constructors Constructor Description GlyphSubstitutionTableReader(RandomAccessFileOrArray rf, int gsubTableLocation, Map<Integer,Character> glyphToCharacterMap, int[] glyphWidthsByIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Glyph>
getGlyphSubstitutionMap()
void
read()
protected void
readSubTable(int lookupType, int subTableLocation)
-
Methods inherited from class com.itextpdf.text.pdf.fonts.otf.OpenTypeFontTableReader
getSupportedLanguage, readCoverageFormat, startReadingTable
-
-
-
-
Constructor Detail
-
GlyphSubstitutionTableReader
public GlyphSubstitutionTableReader(RandomAccessFileOrArray rf, int gsubTableLocation, Map<Integer,Character> glyphToCharacterMap, int[] glyphWidthsByIndex) throws IOException
- Throws:
IOException
-
-
Method Detail
-
read
public void read() throws FontReadingException
- Throws:
FontReadingException
-
getGlyphSubstitutionMap
public Map<String,Glyph> getGlyphSubstitutionMap() throws FontReadingException
- Throws:
FontReadingException
-
readSubTable
protected void readSubTable(int lookupType, int subTableLocation) throws IOException
- Specified by:
readSubTable
in classOpenTypeFontTableReader
- Throws:
IOException
-
-