Class CMapToUnicode
java.lang.Object
com.itextpdf.io.font.cmap.AbstractCMap
com.itextpdf.io.font.cmap.CMapToUnicode
This class represents a CMap file.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreates a new instance of CMap.privateCMapToUnicode(boolean emptyCMap) -
Method Summary
Modifier and TypeMethodDescription(package private) voidaddChar(int cid, char[] uni) (package private) voidaddChar(String mark, CMapObject code) (package private) voidaddCodeSpaceRange(byte[] low, byte[] high) private intconvertToInt(char[] s) private char[]createCharsFromDoubleBytes(byte[] bytes) private char[]createCharsFromSingleBytes(byte[] bytes) getCodes()List<byte[]> Returns a list containing sequential pairs of code space beginning and endings: (begincodespacerange1, endcodespacerange1, begincodespacerange2, endcodespacerange1, ...)static CMapToUnicodebooleanThis will tell if this cmap has any two byte mappings.char[]lookup(byte[] code) char[]lookup(byte[] code, int offset, int length) This will perform a lookup into the map.char[]lookup(int code) Methods inherited from class AbstractCMap
addRange, decodeStringToByte, getName, getOrdering, getRegistry, getSupplement, setName, setOrdering, setRegistry, setSupplement, toUnicodeString
-
Field Details
-
EMPTY_CMAP
-
byteMappings
-
codeSpaceRanges
-
-
Constructor Details
-
CMapToUnicode
private CMapToUnicode(boolean emptyCMap) -
CMapToUnicode
public CMapToUnicode()Creates a new instance of CMap.
-
-
Method Details
-
getIdentity
-
hasByteMappings
public boolean hasByteMappings()This will tell if this cmap has any two byte mappings.- Returns:
- true If there are any two byte mappings, false otherwise.
-
lookup
public char[] lookup(byte[] code, int offset, int length) This will perform a lookup into the map.- Parameters:
code- The code used to lookup.offset- The offset into the byte array.length- The length of the data we are getting.- Returns:
- The string that matches the lookup.
-
lookup
public char[] lookup(byte[] code) -
lookup
public char[] lookup(int code) -
getCodes
-
createDirectMapping
-
createReverseMapping
-
getCodeSpaceRanges
Returns a list containing sequential pairs of code space beginning and endings: (begincodespacerange1, endcodespacerange1, begincodespacerange2, endcodespacerange1, ...)- Returns:
- list of
byte[]that contain code space ranges
-
addCodeSpaceRange
void addCodeSpaceRange(byte[] low, byte[] high) - Overrides:
addCodeSpaceRangein classAbstractCMap
-
convertToInt
private int convertToInt(char[] s) -
addChar
void addChar(int cid, char[] uni) -
addChar
- Specified by:
addCharin classAbstractCMap
-
createCharsFromSingleBytes
private char[] createCharsFromSingleBytes(byte[] bytes) -
createCharsFromDoubleBytes
private char[] createCharsFromDoubleBytes(byte[] bytes)
-