Class CMapFormat4
java.lang.Object
org.loboevolution.pdfview.font.ttf.CMap
org.loboevolution.pdfview.font.ttf.CMapFormat4
CMapFormat4 class.
Author jkaplan
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
CMapFormat4
(short language) Creates a new instance of CMapFormat0 -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSegment
(short startCode, short endCode, char[] map) Add a segment with a mapvoid
addSegment
(short startCode, short endCode, short idDelta) Add a segment with an idDeltagetData()
Get the data in this map as a byte buffershort
Get the entry selectorshort
Get the length of this mapshort
Get the rangeShift()short
Get the search rangeshort
Get the segment countbyte
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 valuevoid
removeSegment
(short startCode, short endCode) Remove a segmentchar
reverseMap
(short glyphID) Get the src code which maps to the given glyphIDvoid
setData
(int length, ByteBuffer data) Set the data for this maptoString()
-
Field Details
-
segments
The segments and associated data can be a char[] or an Integer
-
-
Constructor Details
-
CMapFormat4
protected CMapFormat4(short language) Creates a new instance of CMapFormat0- Parameters:
language
- a short.
-
-
Method Details
-
addSegment
public void addSegment(short startCode, short endCode, char[] map) Add a segment with a map- Parameters:
startCode
- a short.endCode
- a short.map
- an array ofinvalid reference
char
-
addSegment
public void addSegment(short startCode, short endCode, short idDelta) Add a segment with an idDelta- Parameters:
startCode
- a short.endCode
- a short.idDelta
- a short.
-
removeSegment
public void removeSegment(short startCode, short endCode) Remove a segment- Parameters:
startCode
- a short.endCode
- a short.
-
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 valueCannot map from a byte
-
map
public char map(char src) Map a 16 bit value to another 16 but valueMap from char
-
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.
-
setData
Set the data for this mapGet the data in this map as a ByteBuffer
- Specified by:
setData
in classCMap
- Parameters:
length
- aInteger
object.data
- aByteBuffer
object.
-
getData
Get the data in this map as a byte bufferGet the data in the map as a byte buffer
- Specified by:
getData
in classCMap
- Returns:
- a
ByteBuffer
object.
-
getSegmentCount
public short getSegmentCount()Get the segment count- Returns:
- a short.
-
getSearchRange
public short getSearchRange()Get the search range- Returns:
- a short.
-
getEntrySelector
public short getEntrySelector()Get the entry selector- Returns:
- a short.
-
getRangeShift
public short getRangeShift()Get the rangeShift()- Returns:
- a short.
-
toString
Print a pretty string
Get a pretty string
-