Skip to content

Instantly share code, notes, and snippets.

@practicingruby
Created September 13, 2008 18:06
Show Gist options
  • Select an option

  • Save practicingruby/10628 to your computer and use it in GitHub Desktop.

Select an option

Save practicingruby/10628 to your computer and use it in GitHub Desktop.
Prawn::Document.generate("family_style.pdf") do
["Courier","Helvetica","Times-Roman"].each do |f|
[:bold,:bold_italic,:italic,:normal].each do |s|
font f, :style => s
text "I'm writing in #{f} (#{s})"
end
end
font "Helvetica"
text "Normal"
text "Bold", :style => :bold
text "Bold Italic", :style => :bold_italic
text "Italic", :style => :italic
text "Normal"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment