Sha256: 4db0bf7f4ed89fa3bfe94de49c4cacc456034ca69f9c99c0dcf9ecb541c7aaf5

Contents?: true

Size: 882 Bytes

Versions: 2

Compression:

Stored size: 882 Bytes

Contents

# http://github.com/sandal/prawn/issues#issue/56
#
# As of f952055d03f9b21b78ec2844bd873cf62005d00a
# Transactions fail when using TTF fonts.
#
# This is because we use an on_encode Proc that gets included in the 
# @current_page object, which breaks snapshots.  We can surely write
# around this to either split out the Proc into non-marshalled data
# or set up some sort of callback that is indicated by something that
# can be safely marshalled.
#
# But whoever tackles this patch should take care to ensure we
# don't break TTF subsetting support, adding specs if necessary.
#
# Resolved in 36ef89c2bc21e504df623f61d918c5bfdc1fdab1.

$LOAD_PATH << File.join(File.dirname(__FILE__), '..', '..','lib')
require 'prawn/core' 

Prawn::Document.generate("err.pdf") do
  font "#{Prawn::BASEDIR}/data/fonts/DejaVuSans.ttf"
  text "Hi there"
  transaction { text "Nice, thank you" }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
prawn-graph-0.0.2 vendor/prawn-core/bugs/resolved/ttf_fails_in_transactions.rb
prawn-graph-0.0.1 vendor/prawn-core/bugs/resolved/ttf_fails_in_transactions.rb