Module: Pdfrb::FontLoader::FromConfiguration

Defined in:
lib/pdfrb/font_loader/from_configuration.rb

Class Method Summary collapse

Class Method Details

.call(document, name, **_opts) ⇒ Object



8
9
10
11
12
13
14
15
16
# File 'lib/pdfrb/font_loader/from_configuration.rb', line 8

def call(document, name, **_opts)
  config = document.config["font.#{name}"]
  return nil unless config

  case config["type"]
  when "standard14" then Standard14.call(document, config["name"] || name)
  when "file" then FromFile.call(document, config["path"])
  end
end