Package org.verapdf.pd.font.truetype
Class TrueTypeCmapSubtable
java.lang.Object
org.verapdf.pd.font.truetype.TrueTypeCmapSubtable
Instance of this class represents CMap subtable of Type 1 font.
- Author:
- Sergey Shemyakov
-
Constructor Summary
ConstructorsConstructorDescriptionTrueTypeCmapSubtable
(int platformID, int encodingID, long offset) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsCID
(int cid) Checks if particular character ID is present in this CMap.boolean
containsGlyph
(int glyphCode) Checks if particular glyph ID is present in this CMap.int
getGlyph
(int code) Gets GID for specified CID.long
boolean
void
Method adds mapping CID -> GID to CMap.
-
Constructor Details
-
TrueTypeCmapSubtable
public TrueTypeCmapSubtable(int platformID, int encodingID, long offset) Constructor.- Parameters:
platformID
- is platform ID of CMap.encodingID
- is encoding ID of CMap.offset
- is byte offset at which CMap data can be found.
-
-
Method Details
-
getOffset
public long getOffset()- Returns:
- byte offset at which CMap data can be found.
-
put
Method adds mapping CID -> GID to CMap.- Parameters:
key
- is CID.value
- is GID.
-
getGlyph
public int getGlyph(int code) Gets GID for specified CID.- Parameters:
code
- is character code.- Returns:
- glyph ID for this character code.
-
containsGlyph
public boolean containsGlyph(int glyphCode) Checks if particular glyph ID is present in this CMap.- Parameters:
glyphCode
- is glyph ID.- Returns:
- true if glyph is present in this CMap.
-
containsCID
public boolean containsCID(int cid) Checks if particular character ID is present in this CMap.- Parameters:
cid
- is character ID.- Returns:
- true if this CID is present.
-
isStandardEncodingCMap
public boolean isStandardEncodingCMap()
-