class HexaPDF::Type::FontSimple

Parent

Represents a simple PDF font.

A simple font has only single-byte character codes and only supports horizontal metrics.

See: PDF1.7 s9.6

Public Instance Methods

decode(string)

Decodes the given string into an array of character codes.

encoding()

Returns the encoding object used for this font.

Note that the encoding is cached internally when accessed the first time.

symbolic?()

Returns true if the font is a symbolic font, false if it is not, and nil if it is not known.

to_utf8(code)

Returns the UTF-8 string for the given character code, or calls the configuration option 'font.on_missing_unicode_mapping' if no mapping was found.

width(code)

Returns the unscaled width of the given code point in glyph units, or 0 if the width for the code point is missing.

word_spacing_applicable?()

Returns whether word spacing is applicable when using this font.

Always returns true for simple fonts.

See: PDF1.7 s9.3.3

writing_mode()

Returns the writing mode which is always :horizontal for simple fonts like Type1.