com.itextpdf.text.pdf.fonts.otf
Class GlyphSubstitutionTableReader

java.lang.Object
  extended by com.itextpdf.text.pdf.fonts.otf.OpenTypeFontTableReader
      extended by 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
GlyphSubstitutionTableReader(java.lang.String fontFilePath, int gsubTableLocation, java.util.Map<java.lang.Integer,java.lang.Character> glyphToCharacterMap, int[] glyphWidthsByIndex)
           
 
Method Summary
 java.util.Map<java.lang.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlyphSubstitutionTableReader

public GlyphSubstitutionTableReader(java.lang.String fontFilePath,
                                    int gsubTableLocation,
                                    java.util.Map<java.lang.Integer,java.lang.Character> glyphToCharacterMap,
                                    int[] glyphWidthsByIndex)
                             throws java.io.IOException
Throws:
java.io.IOException
Method Detail

read

public void read()
          throws FontReadingException
Throws:
FontReadingException

getGlyphSubstitutionMap

public java.util.Map<java.lang.String,Glyph> getGlyphSubstitutionMap()
                                                              throws FontReadingException
Throws:
FontReadingException

readSubTable

protected void readSubTable(int lookupType,
                            int subTableLocation)
                     throws java.io.IOException
Specified by:
readSubTable in class OpenTypeFontTableReader
Throws:
java.io.IOException


Copyright © 2013. All Rights Reserved.