Class: BrDanfe::DocumentBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/br_danfe/document_builder.rb

Class Method Summary collapse

Class Method Details

.build(*args, &block) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/br_danfe/document_builder.rb', line 3

def self.build(*args, &block)
  document = Prawn::Document.new(*args, &block)

  document.font_families['tinos'] = {
    bold: "#{BrDanfe.root_path}/fonts/tinos_bold.ttf",
    italic: "#{BrDanfe.root_path}/fonts/tinos_italic.ttf",
    bold_italic: "#{BrDanfe.root_path}/fonts/tinos_bold_italic.ttf",
    normal: "#{BrDanfe.root_path}/fonts/tinos.ttf"
  }

  document
end