Sha256: a17210380794484b5a35309068253dc0b6b609b54ebeaa37723870e2f722be38

Contents?: true

Size: 409 Bytes

Versions: 8

Compression:

Stored size: 409 Bytes

Contents

# encoding: utf-8

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

Prawn::Document.generate "hello-ttf.pdf" do       
  fill_color "0000ff"
  font "#{Prawn::BASEDIR}/data/fonts/comicsans.ttf" 
  text "Hello World", :at => [200,720], :size => 32           

  font "#{Prawn::BASEDIR}/data/fonts/Chalkboard.ttf"

  pad(20) do
    text "This is chalkboard wrapping " * 20
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
satoko-prawn-0.2.99.6 examples/simple_text_ttf.rb
prawn-0.1.0 examples/simple_text_ttf.rb
prawn-0.1.1 examples/simple_text_ttf.rb
prawn-0.1.2 examples/simple_text_ttf.rb
prawn-0.2.0 examples/simple_text_ttf.rb
prawn-0.2.1 examples/simple_text_ttf.rb
prawn-0.2.2 examples/simple_text_ttf.rb
prawn-0.2.3 examples/simple_text_ttf.rb