class HexaPDF:: Font:: Encoding:: Base
Parent | Object |
---|
Base
for encoding classes that are used for mapping codes in the range of 0 to 255 to glyph names.
Attributes
The hash mapping codes to names.
The name of the encoding or nil
if the encoding has not been assigned a name.
Public Class Methods
Creates a new encoding object containing no default mappings.
Public Instance Methods
Returns the code for the given glyph name (a Symbol) or nil
if there is no code for the given glyph name.
If multiple codes reference the given glyph name, the first found is always returned.
Returns the name for the given code, or .notdef if no glyph for the code is defined.
The returned value is always a Symbol object!
Returns the Unicode value in UTF-8 for the given code, or nil
if the code cannot be mapped.
Note that this method caches the result of the Unicode mapping and therefore should only be called after all codes have been defined.