Sha256: a3eeca854bb116e1fc8254c64b31450f6f6bb9fb504550cbe0389c5fbcd26416
Contents?: true
Size: 859 Bytes
Versions: 8
Compression:
Stored size: 859 Bytes
Contents
# encoding: utf-8 # # Most font families come with some styles other than normal. Most common are # <code>bold</code>, <code>italic</code> and <code>bold_italic</code>. # # The style can be set the using the <code>:style</code> option, with either the # <code>font</code> method which will set the font and style for rest of the # document, or with the inline text methods. # require File.expand_path(File.join(File.dirname(__FILE__), %w[.. example_helper])) filename = File.basename(__FILE__).gsub('.rb', '.pdf') Prawn::ManualBuilder::Example.generate(filename) do ["Courier", "Helvetica", "Times-Roman"].each do |example_font| move_down 20 [:bold, :bold_italic, :italic, :normal].each do |style| font example_font, :style => style text "I'm writing in #{example_font} (#{style})" end end end
Version data entries
8 entries across 8 versions & 2 rubygems