Class: Kreuzberg::Config::FontConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/kreuzberg/config.rb

Overview

Font configuration for PDF rendering

Examples:

font_config = FontConfig.new(enabled: true, custom_font_dirs: ["/usr/share/fonts"])

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(enabled: true, custom_font_dirs: nil) ⇒ FontConfig

Returns a new instance of FontConfig.



330
331
332
333
# File 'lib/kreuzberg/config.rb', line 330

def initialize(enabled: true, custom_font_dirs: nil)
  @enabled = enabled ? true : false
  @custom_font_dirs = custom_font_dirs
end

Instance Attribute Details

#custom_font_dirsObject

Returns the value of attribute custom_font_dirs.



328
329
330
# File 'lib/kreuzberg/config.rb', line 328

def custom_font_dirs
  @custom_font_dirs
end

#enabledObject

Returns the value of attribute enabled.



328
329
330
# File 'lib/kreuzberg/config.rb', line 328

def enabled
  @enabled
end

Instance Method Details

#to_hObject



335
336
337
338
339
340
# File 'lib/kreuzberg/config.rb', line 335

def to_h
  {
    enabled: @enabled,
    custom_font_dirs: @custom_font_dirs
  }.compact
end