Package com.sun.pdfview.font.ttf
Class CmapTable
- java.lang.Object
-
- com.sun.pdfview.font.ttf.TrueTypeTable
-
- com.sun.pdfview.font.ttf.CmapTable
-
public class CmapTable extends TrueTypeTable
Represents the TTF "cmap" table
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) classCmapTable.CmapSubtable
-
Field Summary
Fields Modifier and Type Field Description private java.util.SortedMap<CmapTable.CmapSubtable,CMap>subtablesHolds the CMap subtables, sorted properlyprivate shortversionHolds value of property version.-
Fields inherited from class com.sun.pdfview.font.ttf.TrueTypeTable
CMAP_TABLE, GLYF_TABLE, HEAD_TABLE, HHEA_TABLE, HMTX_TABLE, LOCA_TABLE, MAXP_TABLE, NAME_TABLE, POST_TABLE
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCmapTable()Creates a new instance of CmapTable
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddCMap(short platformID, short platformSpecificID, CMap cMap)Add a CMapCMapgetCMap(short platformID, short platformSpecificID)Get a CMap by platform and specific IDCMap[]getCMaps()Get all CMapsjava.nio.ByteBuffergetData()Get the data in the tableintgetLength()Get the size of the table, in bytesshortgetNumberSubtables()Get the number of tablesshortgetVersion()Getter for property version.voidremoveCMap(short platformID, short platformSpecificID)Remove a CMapvoidsetData(java.nio.ByteBuffer data)Set the data in the tablevoidsetVersion(short version)Setter for property version.java.lang.StringtoString()Print a pretty string-
Methods inherited from class com.sun.pdfview.font.ttf.TrueTypeTable
createTable, createTable, getTag, stringToTag, tagToString
-
-
-
-
Field Detail
-
version
private short version
Holds value of property version.
-
subtables
private java.util.SortedMap<CmapTable.CmapSubtable,CMap> subtables
Holds the CMap subtables, sorted properly
-
-
Method Detail
-
addCMap
public void addCMap(short platformID, short platformSpecificID, CMap cMap)Add a CMap
-
getCMap
public CMap getCMap(short platformID, short platformSpecificID)
Get a CMap by platform and specific ID
-
getCMaps
public CMap[] getCMaps()
Get all CMaps
-
removeCMap
public void removeCMap(short platformID, short platformSpecificID)Remove a CMap
-
setData
public void setData(java.nio.ByteBuffer data)
Description copied from class:TrueTypeTableSet the data in the table- Overrides:
setDatain classTrueTypeTable
-
getData
public java.nio.ByteBuffer getData()
Description copied from class:TrueTypeTableGet the data in the table- Overrides:
getDatain classTrueTypeTable
-
getLength
public int getLength()
Get the size of the table, in bytes- Overrides:
getLengthin classTrueTypeTable
-
getVersion
public short getVersion()
Getter for property version.- Returns:
- Value of property version.
-
setVersion
public void setVersion(short version)
Setter for property version.- Parameters:
version- New value of property version.
-
getNumberSubtables
public short getNumberSubtables()
Get the number of tables
-
toString
public java.lang.String toString()
Print a pretty string- Overrides:
toStringin classTrueTypeTable
-
-