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 Logger
LOG
protected RandomAccessFileOrArray
rf
private java.util.List<java.lang.String>
supportedLanguages
protected int
tableLocation
-
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 Language
getSupportedLanguage()
protected java.util.List<java.lang.Integer>
readCoverageFormat(int coverageLocation)
private void
readFeatureListTable(int featureListTableLocationOffset)
private void
readFeatureTable(int featureTableLocationOffset)
private TableHeader
readHeader()
private void
readLangSysRecord(java.util.Map<java.lang.String,java.lang.Integer> langSysRecords)
private void
readLangSysTable(int langSysTableLocationOffset)
private void
readLookupListTable(int lookupListTableLocation)
private void
readLookupTable(int lookupTableLocation)
private void
readRangeRecord(java.util.List<java.lang.Integer> glyphIds)
private void
readScriptListTable(int scriptListTableLocationOffset)
private void
readScriptRecord(int scriptListTableLocationOffset, java.util.Map<java.lang.String,java.lang.Integer> scriptRecords)
private void
readScriptTable(int scriptTableLocationOffset)
protected abstract void
readSubTable(int lookupType, int subTableLocation)
protected void
startReadingTable()
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 FontReadingException
This 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
-
-