Package org.apache.fontbox.ttf
Class CMAPEncodingEntry
java.lang.Object
org.apache.fontbox.ttf.CMAPEncodingEntry
An encoding entry for a cmap.
- Version:
- $Revision: 1.2 $
- Author:
- Ben Litchfield
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetGlyphId(int characterCode) Returns the GlyphId linked with the given character code.int[]intintvoidinitData(TTFDataStream data) This will read the required data from the stream.voidinitSubtable(CMAPTable cmap, int numGlyphs, TTFDataStream data) This will read the required data from the stream.protected voidprocessSubtype0(TTFDataStream data) Initialize the CMapEntry when it is a subtype 0protected voidprocessSubtype10(TTFDataStream data, int numGlyphs) Reads a format 10 subtable.protected voidprocessSubtype12(TTFDataStream data, int numGlyphs) Reads a format 12 subtable.protected voidprocessSubtype13(TTFDataStream data, int numGlyphs) Reads a format 13 subtable.protected voidprocessSubtype14(TTFDataStream data, int numGlyphs) Reads a format 14 subtable.protected voidprocessSubtype2(TTFDataStream data, int numGlyphs) Read a format 2 subtable.protected voidprocessSubtype4(TTFDataStream data, int numGlyphs) Reads a format 4 subtable.protected voidprocessSubtype6(TTFDataStream data, int numGlyphs) Reads a format 6 subtable.protected voidprocessSubtype8(TTFDataStream data, int numGlyphs) Reads a format 8 subtable.voidsetGlyphIdToCharacterCode(int[] glyphIdToCharacterCodeValue) voidsetPlatformEncodingId(int platformEncodingIdValue) voidsetPlatformId(int platformIdValue)
-
Constructor Details
-
CMAPEncodingEntry
public CMAPEncodingEntry()
-
-
Method Details
-
initData
This will read the required data from the stream.- Parameters:
data- The stream to read the data from.- Throws:
IOException- If there is an error reading the data.
-
initSubtable
This will read the required data from the stream.- Parameters:
cmap- the CMAP this encoding belongs to.numGlyphs- number of glyphs.data- The stream to read the data from.- Throws:
IOException- If there is an error reading the data.
-
processSubtype8
Reads a format 8 subtable.- Parameters:
data- the data stream of the to be parsed ttf fontnumGlyphs- number of glyphs to be read- Throws:
IOException- If there is an error parsing the true type font.
-
processSubtype10
Reads a format 10 subtable.- Parameters:
data- the data stream of the to be parsed ttf fontnumGlyphs- number of glyphs to be read- Throws:
IOException- If there is an error parsing the true type font.
-
processSubtype12
Reads a format 12 subtable.- Parameters:
data- the data stream of the to be parsed ttf fontnumGlyphs- number of glyphs to be read- Throws:
IOException- If there is an error parsing the true type font.
-
processSubtype13
Reads a format 13 subtable.- Parameters:
data- the data stream of the to be parsed ttf fontnumGlyphs- number of glyphs to be read- Throws:
IOException- If there is an error parsing the true type font.
-
processSubtype14
Reads a format 14 subtable.- Parameters:
data- the data stream of the to be parsed ttf fontnumGlyphs- number of glyphs to be read- Throws:
IOException- If there is an error parsing the true type font.
-
processSubtype6
Reads a format 6 subtable.- Parameters:
data- the data stream of the to be parsed ttf fontnumGlyphs- number of glyphs to be read- Throws:
IOException- If there is an error parsing the true type font.
-
processSubtype4
Reads a format 4 subtable.- Parameters:
data- the data stream of the to be parsed ttf fontnumGlyphs- number of glyphs to be read- Throws:
IOException- If there is an error parsing the true type font.
-
processSubtype2
Read a format 2 subtable.- Parameters:
data- the data stream of the to be parsed ttf fontnumGlyphs- number of glyphs to be read- Throws:
IOException- If there is an error parsing the true type font.
-
processSubtype0
Initialize the CMapEntry when it is a subtype 0- Parameters:
data-- Throws:
IOException
-
getGlyphIdToCharacterCode
public int[] getGlyphIdToCharacterCode()- Returns:
- Returns the glyphIdToCharacterCode.
-
setGlyphIdToCharacterCode
public void setGlyphIdToCharacterCode(int[] glyphIdToCharacterCodeValue) - Parameters:
glyphIdToCharacterCodeValue- The glyphIdToCharacterCode to set.
-
getPlatformEncodingId
public int getPlatformEncodingId()- Returns:
- Returns the platformEncodingId.
-
setPlatformEncodingId
public void setPlatformEncodingId(int platformEncodingIdValue) - Parameters:
platformEncodingIdValue- The platformEncodingId to set.
-
getPlatformId
public int getPlatformId()- Returns:
- Returns the platformId.
-
setPlatformId
public void setPlatformId(int platformIdValue) - Parameters:
platformIdValue- The platformId to set.
-
getGlyphId
public int getGlyphId(int characterCode) Returns the GlyphId linked with the given character code.- Parameters:
characterCode-- Returns:
- glyphId
-