Package org.verapdf.pd.font
Class CIDToGIDMapping
- java.lang.Object
-
- org.verapdf.pd.font.CIDToGIDMapping
-
public class CIDToGIDMapping extends Object
Provides interface for working with CIDToGID mapping in Type 2 CID fonts.- Author:
- Sergey Shemyakov
-
-
Constructor Summary
Constructors Constructor Description CIDToGIDMapping(COSObject obj)
Constructor from COSObject, containing CIDToGID.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
contains(int cid)
Checks if given CID can be mapped into GID with this CIDToGID mapping.int
getGID(int cid)
Gets GID for given CID with use of this CIDToGIDMap.int
getMappingSize()
boolean
isIdentity()
-
-
-
Constructor Detail
-
CIDToGIDMapping
public CIDToGIDMapping(COSObject obj) throws IOException
Constructor from COSObject, containing CIDToGID.- Parameters:
obj
- is COSObject, obtained via key CIDToGIDMap in CIDFontType2 dict.- Throws:
IOException
-
-
Method Detail
-
getGID
public int getGID(int cid)
Gets GID for given CID with use of this CIDToGIDMap.- Parameters:
cid
- is character ID.- Returns:
- glyph ID for cid or 0 of no GID is found.
-
contains
public boolean contains(int cid)
Checks if given CID can be mapped into GID with this CIDToGID mapping.- Parameters:
cid
- is CID to check.- Returns:
- true if cid can be mapped into GID.
-
isIdentity
public boolean isIdentity()
-
getMappingSize
public int getMappingSize()
-
-