Sha256: a1b613d8f01d06a1577885ba0b4c6417298f1a0fb983ccf5cd13817600d59f2c

Contents?: true

Size: 590 Bytes

Versions: 2

Compression:

Stored size: 590 Bytes

Contents

# encoding: utf-8

$LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
require "prawn"

Prawn::Document.generate "font_size.pdf", :page_size => "A4" do
  font 'Helvetica'
  font.size = 16
  
  text 'Font at 16 point'
  
  font.size 9 do
    text 'Font at 9 point'
    text 'Font at manual override 20 point', :size => 20
    text 'Font at 9 point'
  end
  
  font("Times-Roman", :style => :italic, :size => 12) do
    text "Font in times at 12"
    font.size(16) { text "Font in Times at 16" }
  end
  
  text 'Font at 16 point'
  
  font "Courier", :size => 40
  text "40 pt!"
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
fullcirclegroup-fullcirclegroup-prawn-0.2.99.2 examples/font_size.rb
fullcirclegroup-prawn-0.2.99.3 examples/font_size.rb