Class CMapFormat0
java.lang.Object
org.loboevolution.pdfview.font.ttf.CMap
org.loboevolution.pdfview.font.ttf.CMapFormat0
CMapFormat0 class.
Author jkaplan
-
Constructor Summary
ModifierConstructorDescriptionprotected
CMapFormat0
(short language) Creates a new instance of CMapFormat0 -
Method Summary
Modifier and TypeMethodDescriptiongetData()
Get the data in this map as a byte buffershort
Get the length of this mapprotected byte[]
getMap()
Get the whole mapbyte
map
(byte src) Map an 8 bit value to another 8 bit valuechar
map
(char src) Map a 16 bit value to another 16 but valuechar
reverseMap
(short glyphID) Get the src code which maps to the given glyphIDvoid
setData
(int length, ByteBuffer data) Set the data for this mapvoid
setMap
(byte[] glyphIndex) Set the entire mapvoid
setMap
(byte src, byte dest) Set a single mapping entry
-
Constructor Details
-
CMapFormat0
protected CMapFormat0(short language) Creates a new instance of CMapFormat0- Parameters:
language
- a short.
-
-
Method Details
-
getLength
public short getLength()Get the length of this mapGet the length of this table
-
map
public byte map(byte src) Map an 8 bit value to another 8 bit valueMap from a byte
-
map
public char map(char src) Map a 16 bit value to another 16 but valueCannot map from short
-
reverseMap
public char reverseMap(short glyphID) Get the src code which maps to the given glyphIDGet the src code which maps to the given glyphID
- Specified by:
reverseMap
in classCMap
- Parameters:
glyphID
- a short.- Returns:
- a char.
-
setMap
public void setMap(byte src, byte dest) Set a single mapping entry- Parameters:
src
- a byte.dest
- a byte.
-
getMap
protected byte[] getMap()Get the whole map- Returns:
- an array of
invalid reference
byte
-
setMap
public void setMap(byte[] glyphIndex) Set the entire map- Parameters:
glyphIndex
- an array ofinvalid reference
byte
-
getData
Get the data in this map as a byte bufferGet the data in this map as a ByteBuffer
- Specified by:
getData
in classCMap
- Returns:
- a
ByteBuffer
object.
-
setData
Set the data for this mapRead the map in from a byte buffer
- Specified by:
setData
in classCMap
- Parameters:
length
- aInteger
object.data
- aByteBuffer
object.
-