Represents a CMap, a mapping from character codes to CIDs (character IDs) or to their Unicode value.
See: PDF1.7 s9.7.5, s9.10.3; Adobe Technical Notes #5014 and #5411
The writing mode of the CMap: 0 for horizontal, 1 for vertical writing.
Public Class Methods
Public Instance Methods
Adds an individual mapping from character code to CID.
Adds a CID range, mapping characters codes from
end_code to CIDs starting with
Add a codespace range using an array of ranges for the individual bytes.
This means that the first range is checked against the first byte, the second range against the second byte and so on.
Adds a mapping from character code to Unicode string in UTF-8 encoding.
Parses the string and returns all character codes.
An error is raised if the string contains invalid bytes.
Returns the CID for the given character code, or 0 if no mapping was found.
Returns the Unicode string in UTF-8 encoding for the given character code,
nil if no mapping was found.