public final class CMapTable extends SubTableContainerTable implements java.lang.Iterable<CMap>
Modifier and Type | Class and Description |
---|---|
static class |
CMapTable.Builder
CMap Table Builder.
|
static interface |
CMapTable.CMapFilter
A filter on cmaps.
|
static class |
CMapTable.CMapId |
Modifier and Type | Field and Description |
---|---|
static int |
NOTDEF
The .notdef glyph.
|
Modifier and Type | Method and Description |
---|---|
CMap |
cmap(CMapTable.CMapId cmapId) |
CMap |
cmap(int index)
Gets the cmap for the given index.
|
CMap |
cmap(int platformId,
int encodingId)
Gets the cmap with the given ids if it exists.
|
CMapTable.CMapId |
cmapId(int index)
Gets the cmap id for the cmap with the given index.
|
int |
encodingId(int index)
Gets the encoding id for the cmap with the given index.
|
int |
getCmapIndex(CMapTable.CMapId id)
Returns the index of the cmap with the given CMapId in the table or -1 if a cmap with the
CMapId does not exist in the table.
|
java.util.Iterator<CMap> |
iterator()
Gets an iterator over all of the cmaps within this CMapTable.
|
java.util.Iterator<CMap> |
iterator(CMapTable.CMapFilter filter)
Gets an iterator over the cmaps within this CMap table using the provided
filter to select the cmaps returned.
|
int |
numCMaps()
Gets the number of cmaps within the CMap table.
|
int |
offset(int index)
Gets the offset in the table data for the cmap table with the given index.
|
int |
platformId(int index)
Gets the platform id for the cmap with the given index.
|
java.lang.String |
toString() |
int |
version()
Get the table version.
|
calculatedChecksum, header, headerChecksum, headerLength, headerOffset, headerTag
dataLength, readFontData, serialize
public static final int NOTDEF
public int version()
public int numCMaps()
public int getCmapIndex(CMapTable.CMapId id)
id
- the id of the cmap to get the index for; this value cannot be nullpublic CMapTable.CMapId cmapId(int index)
index
- the index of the cmappublic int platformId(int index)
index
- the index of the cmappublic int encodingId(int index)
index
- the index of the cmappublic int offset(int index)
index
- the index of the cmappublic java.util.Iterator<CMap> iterator()
iterator
in interface java.lang.Iterable<CMap>
public java.util.Iterator<CMap> iterator(CMapTable.CMapFilter filter)
filter
- the filterpublic CMap cmap(int index) throws java.io.IOException
index
- the index of the cmapjava.io.IOException
public CMap cmap(int platformId, int encodingId)
platformId
- the platform idencodingId
- the encoding idpublic CMap cmap(CMapTable.CMapId cmapId)