class HexaPDF::Document::Fonts

Parent

This class provides utility functions for working with fonts. It is available through the Document#fonts method.

Public Class Methods

new(document)

Creates a new Fonts object for the given PDF document.

Public Instance Methods

add(name, **options) → font

Adds the font to the document and returns it (using the loaders specified with the configuration option 'font_loaders').

If a font with the same parameters has been loaded before, the cached font object is used.