Class: Metanorma::Collection::Renderer::PdfOptionsNode

Inherits:
Object
  • Object
show all
Defined in:
lib/metanorma/collection/renderer/utils.rb

Instance Method Summary collapse

Constructor Details

#initialize(flavor, options) ⇒ PdfOptionsNode

Returns a new instance of PdfOptionsNode.



156
157
158
159
160
161
162
# File 'lib/metanorma/collection/renderer/utils.rb', line 156

def initialize(flavor, options)
  p = Metanorma::Registry.instance.find_processor(flavor)
  if ::Metanorma::Util::FontistHelper.has_custom_fonts?(p, options, {})
    @fonts_manifest =
      ::Metanorma::Util::FontistHelper.location_manifest(p, options)
  end
end

Instance Method Details

#attr(key) ⇒ Object



164
165
166
167
168
# File 'lib/metanorma/collection/renderer/utils.rb', line 164

def attr(key)
  if key == "fonts-manifest" && @fonts_manifest
    @fonts_manifest
  end
end