class HexaPDF::Font::Encoding::GlyphList

Parent

Provides access to and mapping functionality for the Adobe Glyph List.

The Adobe Glyph List is used for mapping glyph names to Unicode values. The mapping itself is not a one-to-one mapping because some glyphs are mapped to the same Unicode sequence, e.g. the glyph name for ‘A’ and the glyph name for ‘small capital A’.

Since a reverse mapping is needed for converting UTF-8 strings to glyph names when encoding text, this (not unique) reverse mapping is also available. However, only the first occurence of a particular Unicode string is reverse-mapped.

See:

Public Class Methods

name_to_unicode(name, zapf_dingbats: false)
new()

Creates and returns the single GlyphList instance.

Calls superclass method
unicode_to_name(unicode, zapf_dingbats: false)

Public Instance Methods

name_to_unicode(name, zapf_dingbats: false)

Maps the given name to a string by following the Adobe Glyph Specification. Returns nil if the name has no correct mapping.

If this method is invoked when dealing with the ZapfDingbats font, the zapf_dingbats option needs to be set to true.

Assumes that the name is a Symbol and that it includes just one component (no underscores)!

unicode_to_name(unicode, zapf_dingbats: false)

Maps the given Unicode codepoint/string to a name in the Adobe Glyph List, or to .notdef if there is no mapping.

If this method is invoked when dealing with the ZapfDingbats font, the zapf_dingbats option needs to be set to true.