Package com.itextpdf.io.font.otf
Class OtfReadCommon
java.lang.Object
com.itextpdf.io.font.otf.OtfReadCommon
Represents the OpenType font reading utility.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GposAnchor[]readAnchorArray(OpenTypeFontTableReader tableReader, int[] locations, int left, int right) Reads the anchor array from OpenType data.static List<GposAnchor[]>readBaseArray(OpenTypeFontTableReader tableReader, int classCount, int location) Reads the base array from OpenType data.readCoverageFormat(RandomAccessFileOrArray rf, int coverageLocation) Reads the coverage format from OpenType data.static voidreadCoverages(RandomAccessFileOrArray rf, int[] locations, List<Set<Integer>> coverage) Reads the coverages from OpenType data.static GposAnchorreadGposAnchor(OpenTypeFontTableReader tableReader, int location) Reads the GPOS anchor from OpenType data.static GposValueRecordreadGposValueRecord(OpenTypeFontTableReader tableReader, int mask) Reads the GPOS value record from OpenType data.static List<List<GposAnchor[]>>readLigatureArray(OpenTypeFontTableReader tableReader, int classCount, int location) Reads the ligature array from OpenType data.static List<OtfMarkRecord>readMarkArray(OpenTypeFontTableReader tableReader, int location) Reads the mark array from OpenType data.static PosLookupRecord[]readPosLookupRecords(RandomAccessFileOrArray rf, int recordCount) Reads the positioning lookup records from OpenType data.static SubstLookupRecord[]readSubstLookupRecords(RandomAccessFileOrArray rf, int substCount) Reads the substitution lookup records from OpenType data.static int[]readUShortArray(RandomAccessFileOrArray rf, int size) Reads the ushort array from OpenType datastatic int[]readUShortArray(RandomAccessFileOrArray rf, int size, int location) Reads the ushort array from OpenType data.
-
Constructor Details
-
OtfReadCommon
public OtfReadCommon()
-
-
Method Details
-
readUShortArray
public static int[] readUShortArray(RandomAccessFileOrArray rf, int size, int location) throws IOException Reads the ushort array from OpenType data.- Parameters:
-
rf- the raw source -
size- the size -
location- the location - Returns:
- the requested result
- Throws:
-
IOException- if the OpenType data cannot be read
-
readUShortArray
Reads the ushort array from OpenType data- Parameters:
-
rf- the raw source -
size- the size - Returns:
- the requested result
- Throws:
-
IOException- if the OpenType data cannot be read
-
readCoverages
public static void readCoverages(RandomAccessFileOrArray rf, int[] locations, List<Set<Integer>> coverage) throws IOException Reads the coverages from OpenType data.- Parameters:
-
rf- the raw source -
locations- the locations -
coverage- the coverage - Throws:
-
IOException- if the OpenType data cannot be read
-
readCoverageFormat
public static List<Integer> readCoverageFormat(RandomAccessFileOrArray rf, int coverageLocation) throws IOException Reads the coverage format from OpenType data.- Parameters:
-
rf- the raw source -
coverageLocation- the coverage location - Returns:
- the requested result
- Throws:
-
IOException- if the OpenType data cannot be read
-
readGposValueRecord
public static GposValueRecord readGposValueRecord(OpenTypeFontTableReader tableReader, int mask) throws IOException Reads the GPOS value record from OpenType data.- Parameters:
-
tableReader- the table reader -
mask- the mask - Returns:
- the requested result
- Throws:
-
IOException- if the OpenType data cannot be read
-
readGposAnchor
public static GposAnchor readGposAnchor(OpenTypeFontTableReader tableReader, int location) throws IOException Reads the GPOS anchor from OpenType data.- Parameters:
-
tableReader- the table reader -
location- the location - Returns:
- the requested result
- Throws:
-
IOException- if the OpenType data cannot be read
-
readMarkArray
public static List<OtfMarkRecord> readMarkArray(OpenTypeFontTableReader tableReader, int location) throws IOException Reads the mark array from OpenType data.- Parameters:
-
tableReader- the table reader -
location- the location - Returns:
- the requested result
- Throws:
-
IOException- if the OpenType data cannot be read
-
readSubstLookupRecords
public static SubstLookupRecord[] readSubstLookupRecords(RandomAccessFileOrArray rf, int substCount) throws IOException Reads the substitution lookup records from OpenType data.- Parameters:
-
rf- the raw source -
substCount- the subst count - Returns:
- the requested result
- Throws:
-
IOException- if the OpenType data cannot be read
-
readPosLookupRecords
public static PosLookupRecord[] readPosLookupRecords(RandomAccessFileOrArray rf, int recordCount) throws IOException Reads the positioning lookup records from OpenType data.- Parameters:
-
rf- the raw source -
recordCount- the record count - Returns:
- the requested result
- Throws:
-
IOException- if the OpenType data cannot be read
-
readAnchorArray
public static GposAnchor[] readAnchorArray(OpenTypeFontTableReader tableReader, int[] locations, int left, int right) throws IOException Reads the anchor array from OpenType data.- Parameters:
-
tableReader- the table reader -
locations- the locations -
left- the left -
right- the right - Returns:
- the requested result
- Throws:
-
IOException- if the OpenType data cannot be read
-
readBaseArray
public static List<GposAnchor[]> readBaseArray(OpenTypeFontTableReader tableReader, int classCount, int location) throws IOException Reads the base array from OpenType data.- Parameters:
-
tableReader- the table reader -
classCount- the class count -
location- the location - Returns:
- the requested result
- Throws:
-
IOException- if the OpenType data cannot be read
-
readLigatureArray
public static List<List<GposAnchor[]>> readLigatureArray(OpenTypeFontTableReader tableReader, int classCount, int location) throws IOException Reads the ligature array from OpenType data.- Parameters:
-
tableReader- the table reader -
classCount- the class count -
location- the location - Returns:
- the requested result
- Throws:
-
IOException- if the OpenType data cannot be read
-