class Proforma::PrawnRenderer::Util::Font
Defines what we & prawn need in a font.
Attributes
bold_path[R]
name[R]
normal_path[R]
Public Class Methods
new(bold_path:, name:, normal_path:)
click to toggle source
# File lib/proforma/prawn_renderer/util/font.rb, line 21 def initialize(bold_path:, name:, normal_path:) raise ArgumentError, 'bold_path is required' if bold_path.to_s.empty? raise ArgumentError, 'name is required' if name.to_s.empty? raise ArgumentError, 'normal_path is required' if normal_path.to_s.empty? @bold_path = bold_path @name = name @normal_path = normal_path freeze end
Public Instance Methods
prawn_config()
click to toggle source
# File lib/proforma/prawn_renderer/util/font.rb, line 33 def prawn_config { name.to_s => { normal: normal_path.to_s, bold: bold_path.to_s } } end