Class CMapFormat0
java.lang.Object
org.loboevolution.pdfview.font.ttf.CMap
org.loboevolution.pdfview.font.ttf.CMapFormat0
CMapFormat0 class.
Author jkaplan
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCMapFormat0(short language) Creates a new instance of CMapFormat0 -
Method Summary
Modifier and TypeMethodDescriptiongetData()Get the data in this map as a byte buffershortGet the length of this mapprotected byte[]getMap()Get the whole mapbytemap(byte src) Map an 8 bit value to another 8 bit valuecharmap(char src) Map a 16 bit value to another 16 but valuecharreverseMap(short glyphID) Get the src code which maps to the given glyphIDvoidsetData(int length, ByteBuffer data) Set the data for this mapvoidsetMap(byte[] glyphIndex) Set the entire mapvoidsetMap(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:
reverseMapin 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
objects.
invalid reference
byte
-
setMap
public void setMap(byte[] glyphIndex) Set the entire map- Parameters:
glyphIndex- an array ofobjects.invalid reference
byte
-
getData
Get the data in this map as a byte bufferGet the data in this map as a ByteBuffer
- Specified by:
getDatain classCMap- Returns:
- a
ByteBufferobject.
-
setData
Set the data for this mapRead the map in from a byte buffer
- Specified by:
setDatain classCMap- Parameters:
length- aIntegerobject.data- aByteBufferobject.
-