Sha256: 08167d91a37a33e4c90b47c3040d87bcfbdf34ea92dd98bcec4537e5bd4d5865

Contents?: true

Size: 505 Bytes

Versions: 5

Compression:

Stored size: 505 Bytes

Contents

# encoding: utf-8
#
# An early example of TTF font embedding.  Mostly kept for nostalgia's sake.
#
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', '..', 'lib'))
require "prawn"

Prawn::Document.generate "simple_text_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

5 entries across 5 versions & 2 rubygems

Version Path
kavu-prawn-core-0.4.100 examples/text/simple_text_ttf.rb
kavu-prawn-core-0.4.99 examples/text/simple_text_ttf.rb
prawn-0.3.0 examples/text/simple_text_ttf.rb
prawn-0.4.1 examples/text/simple_text_ttf.rb
prawn-0.4.0 examples/text/simple_text_ttf.rb