module HexaPDF::FontLoader::FromConfiguration

This module uses the configuration option 'font.map' for loading a font.

Public Class Methods

call(document, name, variant: :none, subset: true)ΒΆ

Loads the given font by looking up the needed file in the 'font.map' configuration option.

The file object representing the font file is not closed and if needed must be closed by the caller once the font is not needed anymore.

document

The PDF document to associate the font object with.

name

The name of the font.

variant

The font variant. Normally one of :none, :bold, :italic, :bold_italic.

subset

Specifies whether the font should be subset if possible.