public class CmapSubtable
extends java.lang.Object
| Constructor and Description |
|---|
CmapSubtable() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Integer |
getCharacterCode(int gid)
Deprecated.
the mapping may be ambiguous, see
getCharCodes(int). The first mapped value is returned by
default. |
java.util.List<java.lang.Integer> |
getCharCodes(int gid)
Returns all possible character codes for the given gid, or null if there is none.
|
int |
getGlyphId(int characterCode)
Returns the GlyphId linked with the given character code.
|
int |
getPlatformEncodingId() |
int |
getPlatformId() |
void |
initData(org.apache.fontbox.ttf.TTFDataStream data)
This will read the required data from the stream.
|
void |
initSubtable(CmapTable cmap,
int numGlyphs,
org.apache.fontbox.ttf.TTFDataStream data)
This will read the required data from the stream.
|
protected void |
processSubtype0(org.apache.fontbox.ttf.TTFDataStream data)
Initialize the CMapEntry when it is a subtype 0.
|
protected void |
processSubtype10(org.apache.fontbox.ttf.TTFDataStream data,
int numGlyphs)
Reads a format 10 subtable.
|
protected void |
processSubtype12(org.apache.fontbox.ttf.TTFDataStream data,
int numGlyphs)
Reads a format 12 subtable.
|
protected void |
processSubtype13(org.apache.fontbox.ttf.TTFDataStream data,
int numGlyphs)
Reads a format 13 subtable.
|
protected void |
processSubtype14(org.apache.fontbox.ttf.TTFDataStream data,
int numGlyphs)
Reads a format 14 subtable.
|
protected void |
processSubtype2(org.apache.fontbox.ttf.TTFDataStream data,
int numGlyphs)
Read a format 2 subtable.
|
protected void |
processSubtype4(org.apache.fontbox.ttf.TTFDataStream data,
int numGlyphs)
Reads a format 4 subtable.
|
protected void |
processSubtype6(org.apache.fontbox.ttf.TTFDataStream data,
int numGlyphs)
Reads a format 6 subtable.
|
protected void |
processSubtype8(org.apache.fontbox.ttf.TTFDataStream data,
int numGlyphs)
Reads a format 8 subtable.
|
void |
setPlatformEncodingId(int platformEncodingIdValue) |
void |
setPlatformId(int platformIdValue) |
java.lang.String |
toString() |
public void initData(org.apache.fontbox.ttf.TTFDataStream data)
throws java.io.IOException
data - The stream to read the data from.java.io.IOException - If there is an error reading the data.public void initSubtable(CmapTable cmap, int numGlyphs, org.apache.fontbox.ttf.TTFDataStream data) throws java.io.IOException
cmap - the CMAP this encoding belongs to.numGlyphs - number of glyphs.data - The stream to read the data from.java.io.IOException - If there is an error reading the data.protected void processSubtype8(org.apache.fontbox.ttf.TTFDataStream data,
int numGlyphs)
throws java.io.IOException
data - the data stream of the to be parsed ttf fontnumGlyphs - number of glyphs to be readjava.io.IOException - If there is an error parsing the true type font.protected void processSubtype10(org.apache.fontbox.ttf.TTFDataStream data,
int numGlyphs)
throws java.io.IOException
data - the data stream of the to be parsed ttf fontnumGlyphs - number of glyphs to be readjava.io.IOException - If there is an error parsing the true type font.protected void processSubtype12(org.apache.fontbox.ttf.TTFDataStream data,
int numGlyphs)
throws java.io.IOException
data - the data stream of the to be parsed ttf fontnumGlyphs - number of glyphs to be readjava.io.IOException - If there is an error parsing the true type font.protected void processSubtype13(org.apache.fontbox.ttf.TTFDataStream data,
int numGlyphs)
throws java.io.IOException
data - the data stream of the to be parsed ttf fontnumGlyphs - number of glyphs to be readjava.io.IOException - If there is an error parsing the true type font.protected void processSubtype14(org.apache.fontbox.ttf.TTFDataStream data,
int numGlyphs)
throws java.io.IOException
data - the data stream of the to be parsed ttf fontnumGlyphs - number of glyphs to be readjava.io.IOException - If there is an error parsing the true type font.protected void processSubtype6(org.apache.fontbox.ttf.TTFDataStream data,
int numGlyphs)
throws java.io.IOException
data - the data stream of the to be parsed ttf fontnumGlyphs - number of glyphs to be readjava.io.IOException - If there is an error parsing the true type font.protected void processSubtype4(org.apache.fontbox.ttf.TTFDataStream data,
int numGlyphs)
throws java.io.IOException
data - the data stream of the to be parsed ttf fontnumGlyphs - number of glyphs to be readjava.io.IOException - If there is an error parsing the true type font.protected void processSubtype2(org.apache.fontbox.ttf.TTFDataStream data,
int numGlyphs)
throws java.io.IOException
data - the data stream of the to be parsed ttf fontnumGlyphs - number of glyphs to be readjava.io.IOException - If there is an error parsing the true type font.protected void processSubtype0(org.apache.fontbox.ttf.TTFDataStream data)
throws java.io.IOException
data - the data stream of the to be parsed ttf fontjava.io.IOException - If there is an error parsing the true type font.public int getPlatformEncodingId()
public void setPlatformEncodingId(int platformEncodingIdValue)
platformEncodingIdValue - The platformEncodingId to set.public int getPlatformId()
public void setPlatformId(int platformIdValue)
platformIdValue - The platformId to set.public int getGlyphId(int characterCode)
characterCode - the given character code to be mappedpublic java.lang.Integer getCharacterCode(int gid)
getCharCodes(int). The first mapped value is returned by
default.gid - glyph idpublic java.util.List<java.lang.Integer> getCharCodes(int gid)
gid - glyph idpublic java.lang.String toString()
toString in class java.lang.Object