Sha256: 8ccbe08276a8085044d0a162322057f2f9301d2af8cd5e64dbf79fb82b0d3bba

Contents?: true

Size: 478 Bytes

Versions: 13

Compression:

Stored size: 478 Bytes

Contents

# encoding: utf-8
#
# An early example of TTF font embedding.  Mostly kept for nostalgia's sake.
#
require "#{File.dirname(__FILE__)}/../example_helper.rb"

Prawn::Document.generate "simple_text_ttf.pdf" do       
  fill_color "0000ff"
  font "#{Prawn::BASEDIR}/data/fonts/comicsans.ttf" 
  draw_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

13 entries across 13 versions & 6 rubygems

Version Path
piglop-prawn-0.10.2.3 examples/text/simple_text_ttf.rb
piglop-prawn-0.10.2.2 examples/text/simple_text_ttf.rb
piglop-prawn-0.10.2.1 examples/text/simple_text_ttf.rb
prawn-0.11.1.pre examples/text/simple_text_ttf.rb
goodwill-prawn-edge-0.10.0 examples/text/simple_text_ttf.rb
alphasights-prawn-0.10.4 examples/text/simple_text_ttf.rb
alphasights-prawn-0.10.3 examples/text/simple_text_ttf.rb
alphasights-prawn-0.10.2 examples/text/simple_text_ttf.rb
alphasights-prawn-0.10.1 examples/text/simple_text_ttf.rb
alphasights-prawn-0.10.0 examples/text/simple_text_ttf.rb
prawn-core-0.8.4 examples/text/simple_text_ttf.rb
prawn-graph-0.0.2 vendor/prawn-core/examples/text/simple_text_ttf.rb
prawn-graph-0.0.1 vendor/prawn-core/examples/text/simple_text_ttf.rb