Sha256: 106d83c8a0e0701d714cce3e66be33a0f9986425ac766149e91e2592fe8a3d7a

Contents?: true

Size: 825 Bytes

Versions: 6

Compression:

Stored size: 825 Bytes

Contents

# All example code may be executed by calling `rake legend`

require_relative '../lib/prawn/icon'
require_relative 'example_helper'

Prawn::Document.generate('paymentfont.pdf') do
  deja_path = File.join \
    Prawn::Icon::FONTDIR, 'DejaVuSans.ttf'

  font_families.update({
    'deja' => { normal: deja_path }
  })

  font('deja')

  icons = icon_keys(self, 'pf')
  required_pages = number_of_pages(self, 'pf')

  define_grid(columns: 6, rows: 12, gutter: 16)

  sub_header = 'PaymentFont'
  link = 'http://paymentfont.io'
  page_header sub_header, link

  first_page_icons icons do |icon_key|
    # Just call the +icon+ method and pass in an icon key
    icon icon_key, size: 20, align: :center
  end

  start_new_page

  page_icons icons, required_pages do |icon_key|
    icon icon_key, size: 20, align: :center
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
prawn-icon-1.1.1 examples/paymentfont.rb
prawn-icon-1.1.0 examples/paymentfont.rb
prawn-icon-1.0.0 examples/paymentfont.rb
prawn-icon-0.7.1 examples/paymentfont.rb
prawn-icon-0.7.0 examples/paymentfont.rb
prawn-icon-0.6.4 examples/paymentfont.rb