Package org.verapdf.pd.font
Class CIDToGIDMapping
java.lang.Object
org.verapdf.pd.font.CIDToGIDMapping
Provides interface for working with CIDToGID mapping in Type 2 CID fonts.
- Author:
- Sergey Shemyakov
-
Constructor Summary
ConstructorDescriptionCIDToGIDMapping
(COSObject obj) Constructor from COSObject, containing CIDToGID. -
Method Summary
-
Constructor Details
-
CIDToGIDMapping
Constructor from COSObject, containing CIDToGID.- Parameters:
obj
- is COSObject, obtained via key CIDToGIDMap in CIDFontType2 dict.- Throws:
IOException
-
-
Method Details
-
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()
-