Sha256: 29567c5dece99e0c6ed1086079a2cb79e7e68b224ab6c1b17023f66a28d8396b
Contents?: true
Size: 772 Bytes
Versions: 2
Compression:
Stored size: 772 Bytes
Contents
# encoding: utf-8 # # This example demonstrates using the :style option for Document#text. # If you are working with TTF fonts, you'll want to check out the # documentation for Document#font_families and register your fonts with it. # require File.expand_path(File.join(File.dirname(__FILE__), %w[.. example_helper])) 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
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
prawn-0.11.1 | examples/text/family_based_styling.rb |
davebenvenuti-prawn-0.11.1.pre | examples/text/family_based_styling.rb |