Class: Metanorma::FontistUtils
- Inherits:
-
Object
- Object
- Metanorma::FontistUtils
- Defined in:
- lib/metanorma/fontist_utils.rb
Class Method Summary collapse
- .has_fonts_manifest?(processor, options = {}) ⇒ Boolean
- .install_fonts(processor, options) ⇒ Object
- .location_manifest(processor) ⇒ Object
Class Method Details
.has_fonts_manifest?(processor, options = {}) ⇒ Boolean
103 104 105 106 107 |
# File 'lib/metanorma/fontist_utils.rb', line 103 def self.has_fonts_manifest?(processor, = {}) ![:no_install_fonts] \ && processor.respond_to?(:fonts_manifest) \ && !processor.fonts_manifest.nil? end |
.install_fonts(processor, options) ⇒ Object
88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/metanorma/fontist_utils.rb', line 88 def self.install_fonts(processor, ) return unless validate_install_fonts(processor, ) @@updated_formulas_repo = false manifest = processor.fonts_manifest agree_to_terms, can_without_fonts, no_progress = () install_fonts_safe( manifest, agree_to_terms, can_without_fonts, no_progress, ) end |
.location_manifest(processor) ⇒ Object
109 110 111 |
# File 'lib/metanorma/fontist_utils.rb', line 109 def self.location_manifest(processor) Fontist::Manifest::Locations.from_hash(processor.fonts_manifest) end |