Package com.itextpdf.text.pdf.fonts.otf
Class OpenTypeFontTableReader
- java.lang.Object
-
- com.itextpdf.text.pdf.fonts.otf.OpenTypeFontTableReader
-
- Direct Known Subclasses:
GlyphPositioningTableReader,GlyphSubstitutionTableReader
public abstract class OpenTypeFontTableReader extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static LoggerLOGprotected RandomAccessFileOrArrayrfprivate java.util.List<java.lang.String>supportedLanguagesprotected inttableLocation
-
Constructor Summary
Constructors Constructor Description OpenTypeFontTableReader(RandomAccessFileOrArray rf, int tableLocation)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description LanguagegetSupportedLanguage()protected java.util.List<java.lang.Integer>readCoverageFormat(int coverageLocation)private voidreadFeatureListTable(int featureListTableLocationOffset)private voidreadFeatureTable(int featureTableLocationOffset)private TableHeaderreadHeader()private voidreadLangSysRecord(java.util.Map<java.lang.String,java.lang.Integer> langSysRecords)private voidreadLangSysTable(int langSysTableLocationOffset)private voidreadLookupListTable(int lookupListTableLocation)private voidreadLookupTable(int lookupTableLocation)private voidreadRangeRecord(java.util.List<java.lang.Integer> glyphIds)private voidreadScriptListTable(int scriptListTableLocationOffset)private voidreadScriptRecord(int scriptListTableLocationOffset, java.util.Map<java.lang.String,java.lang.Integer> scriptRecords)private voidreadScriptTable(int scriptTableLocationOffset)protected abstract voidreadSubTable(int lookupType, int subTableLocation)protected voidstartReadingTable()This is the starting point of the class.
-
-
-
Field Detail
-
LOG
protected static final Logger LOG
-
rf
protected final RandomAccessFileOrArray rf
-
tableLocation
protected final int tableLocation
-
supportedLanguages
private java.util.List<java.lang.String> supportedLanguages
-
-
Constructor Detail
-
OpenTypeFontTableReader
public OpenTypeFontTableReader(RandomAccessFileOrArray rf, int tableLocation) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
getSupportedLanguage
public Language getSupportedLanguage() throws FontReadingException
- Throws:
FontReadingException
-
startReadingTable
protected final void startReadingTable() throws FontReadingExceptionThis is the starting point of the class. A sub-class must call this method to start getting call backs to thereadSubTable(int, int)method.- Throws:
FontReadingException
-
readSubTable
protected abstract void readSubTable(int lookupType, int subTableLocation) throws java.io.IOException- Throws:
java.io.IOException
-
readLookupListTable
private void readLookupListTable(int lookupListTableLocation) throws java.io.IOException- Throws:
java.io.IOException
-
readLookupTable
private void readLookupTable(int lookupTableLocation) throws java.io.IOException- Throws:
java.io.IOException
-
readCoverageFormat
protected final java.util.List<java.lang.Integer> readCoverageFormat(int coverageLocation) throws java.io.IOException- Throws:
java.io.IOException
-
readRangeRecord
private void readRangeRecord(java.util.List<java.lang.Integer> glyphIds) throws java.io.IOException- Throws:
java.io.IOException
-
readScriptListTable
private void readScriptListTable(int scriptListTableLocationOffset) throws java.io.IOException- Throws:
java.io.IOException
-
readScriptRecord
private void readScriptRecord(int scriptListTableLocationOffset, java.util.Map<java.lang.String,java.lang.Integer> scriptRecords) throws java.io.IOException- Throws:
java.io.IOException
-
readScriptTable
private void readScriptTable(int scriptTableLocationOffset) throws java.io.IOException- Throws:
java.io.IOException
-
readLangSysRecord
private void readLangSysRecord(java.util.Map<java.lang.String,java.lang.Integer> langSysRecords) throws java.io.IOException- Throws:
java.io.IOException
-
readLangSysTable
private void readLangSysTable(int langSysTableLocationOffset) throws java.io.IOException- Throws:
java.io.IOException
-
readFeatureListTable
private void readFeatureListTable(int featureListTableLocationOffset) throws java.io.IOException- Throws:
java.io.IOException
-
readFeatureTable
private void readFeatureTable(int featureTableLocationOffset) throws java.io.IOException- Throws:
java.io.IOException
-
readHeader
private TableHeader readHeader() throws java.io.IOException
- Throws:
java.io.IOException
-
-