|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.fontbox.cmap.CMap
public class CMap
This class represents a CMap file.
Constructor Summary | |
---|---|
CMap()
Creates a new instance of CMap. |
Method Summary | |
---|---|
void |
addCIDMapping(int src,
java.lang.String dest)
This will add a CID mapping. |
void |
addCIDRange(char from,
char to,
int cid)
This will add a CID Range. |
void |
addCodespaceRange(CodespaceRange range)
This will add a codespace range. |
void |
addMapping(byte[] src,
java.lang.String dest)
This will add a mapping. |
java.util.List<CodespaceRange> |
getCodeSpaceRanges()
Getter for property codeSpaceRanges. |
java.lang.String |
getName()
Returns the name of the CMap. |
java.lang.String |
getOrdering()
Returns the ordering of the CIDSystemInfo. |
java.lang.String |
getRegistry()
Returns the registry of the CIDSystemInfo. |
int |
getSpaceMapping()
Returns the mapping for the space character. |
int |
getSupplement()
Returns the supplement of the CIDSystemInfo. |
int |
getType()
Returns the type of the CMap. |
java.lang.String |
getVersion()
Returns the version of the CMap. |
int |
getWMode()
Returns the WMode of a CMap. 0 represents a horizontal and 1 represents a vertical orientation. |
boolean |
hasCIDMappings()
This will tell if this cmap has any CID mappings. |
boolean |
hasOneByteMappings()
This will tell if this cmap has any one byte mappings. |
boolean |
hasTwoByteMappings()
This will tell if this cmap has any two byte mappings. |
boolean |
isInCodeSpaceRanges(byte[] code)
Check whether the given byte array is in codespace ranges or not. |
boolean |
isInCodeSpaceRanges(byte[] code,
int offset,
int length)
Check whether the given byte array is in codespace ranges or not. |
java.lang.String |
lookup(byte[] code,
int offset,
int length)
This will perform a lookup into the map. |
java.lang.String |
lookup(int code,
int length)
This will perform a lookup into the map. |
int |
lookupCID(byte[] code,
int offset,
int length)
This will perform a lookup into the CID map. |
java.lang.String |
lookupCID(int cid)
This will perform a lookup into the CID map. |
void |
setName(java.lang.String name)
Sets the name of the CMap. |
void |
setOrdering(java.lang.String newOrdering)
Sets the ordering of the CIDSystemInfo. |
void |
setRegistry(java.lang.String newRegistry)
Sets the registry of the CIDSystemInfo. |
void |
setSupplement(int newSupplement)
Sets the supplement of the CIDSystemInfo. |
void |
setType(int type)
Sets the type of the CMap. |
void |
setVersion(java.lang.String version)
Sets the version of the CMap. |
void |
setWMode(int newWMode)
Sets the WMode of a CMap. |
void |
useCmap(CMap cmap)
Implementation of the usecmap operator. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CMap()
Method Detail |
---|
public boolean hasOneByteMappings()
public boolean hasTwoByteMappings()
public boolean hasCIDMappings()
public java.lang.String lookup(byte[] code, int offset, int length)
code
- The code used to lookup.offset
- The offset into the byte array.length
- The length of the data we are getting.
public java.lang.String lookup(int code, int length)
code
- The code used to lookup.length
- The length of the data we are getting.
public java.lang.String lookupCID(int cid)
cid
- The CID used to lookup.
public int lookupCID(byte[] code, int offset, int length)
code
- The code used to lookup.offset
- the offset into the array.length
- the length of the subarray.
public void addMapping(byte[] src, java.lang.String dest) throws java.io.IOException
src
- The src to the mapping.dest
- The dest to the mapping.
java.io.IOException
- if the src is invalid.public void addCIDMapping(int src, java.lang.String dest) throws java.io.IOException
src
- The CID to the mapping.dest
- The dest to the mapping.
java.io.IOException
- if the src is invalid.public void addCIDRange(char from, char to, int cid)
from
- starting charactor of the CID range.to
- ending character of the CID range.cid
- the cid to be started with.public void addCodespaceRange(CodespaceRange range)
range
- A single codespace range.public java.util.List<CodespaceRange> getCodeSpaceRanges()
public void useCmap(CMap cmap)
cmap
- The cmap to load mappings from.public boolean isInCodeSpaceRanges(byte[] code)
code
- The byte array to look for in the codespace range.
public boolean isInCodeSpaceRanges(byte[] code, int offset, int length)
code
- The byte array to look for in the codespace range.offset
- The starting offset within the byte array.length
- The length of the part of the array.
public int getWMode()
public void setWMode(int newWMode)
newWMode
- the new WMode.public java.lang.String getName()
public void setName(java.lang.String name)
name
- the CMap name.public java.lang.String getVersion()
public void setVersion(java.lang.String version)
version
- the CMap version.public int getType()
public void setType(int type)
type
- the CMap type.public java.lang.String getRegistry()
public void setRegistry(java.lang.String newRegistry)
newRegistry
- the registry.public java.lang.String getOrdering()
public void setOrdering(java.lang.String newOrdering)
newOrdering
- the ordering.public int getSupplement()
public void setSupplement(int newSupplement)
newSupplement
- the supplement.public int getSpaceMapping()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |