Package org.verapdf.pd.font.cmap
Class CMap
java.lang.Object
org.verapdf.pd.font.cmap.CMap
- Direct Known Subclasses:
IdentityCMap
This class represents cmap.
- Author:
- Sergey Shemyakov
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsCode
(int character) List<org.verapdf.pd.font.cmap.CIDMappable>
int
getCodeFromStream
(InputStream stream) Reads character code from input stream and returnes it's CID.getName()
int
getUnicode
(int code) Returns Unicode sequence for given character code.int
getwMode()
boolean
void
setSupplement
(int supplement) void
setUsesNonPredefinedCMap
(boolean usesNonPredefinedCMap) Sets indicator for CMap to contain reference to a non-predefined CMap.int
toCID
(int character) Gets CID for given character.void
Method adds all the data needed to this CMap from another CMap.
-
Constructor Details
-
CMap
public CMap()
-
-
Method Details
-
toCID
public int toCID(int character) Gets CID for given character.- Parameters:
character
- is code of character, for which CID is calculated.- Returns:
- CID for given character or 0 if it cannot be obtained.
-
containsCode
public boolean containsCode(int character) - Returns:
- true if this CMap can convert given code to CID.
-
getCodeFromStream
Reads character code from input stream and returnes it's CID. This uses codespace information from CMap. Details are described in PDF32000 in 9.7.6.2 "CMap Mapping".- Parameters:
stream
- is stream from which character codes will be read.- Returns:
- CID of read code.
- Throws:
IOException
-
useCMap
Method adds all the data needed to this CMap from another CMap.- Parameters:
another
- is another CMap.
-
getwMode
public int getwMode()- Returns:
- writing mode of given CMap.
-
getRegistry
- Returns:
- Registry value from CIDSystemInfo dictionary.
-
getOrdering
- Returns:
- Ordering value from CIDSystemInfo dictionary.
-
getSupplement
public int getSupplement()- Returns:
- supplement of CMap.
-
setSupplement
public void setSupplement(int supplement) -
isUsesNonPredefinedCMap
public boolean isUsesNonPredefinedCMap()- Returns:
- true if this CMap references non-predefined CMap with usecmap operator.
-
setUsesNonPredefinedCMap
public void setUsesNonPredefinedCMap(boolean usesNonPredefinedCMap) Sets indicator for CMap to contain reference to a non-predefined CMap. -
getUnicode
Returns Unicode sequence for given character code.- Parameters:
code
- is code of character.- Returns:
- Unicode sequence obtained from this CMap.
-
getName
- Returns:
- name of this CMap.
-
getCidMappings
-