1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# encoding: utf-8
#
# As of Prawn 0.3, it is possible to generate a Euro using the built-in
# AFM files.  However, you need to be sure to manually add spacing around it,
# as its calculated width in the AFM files seem to be wrong.
#
# We are investigating this issue, but it does not seem to be Prawn specific.
# If you need precision spacing, use a TTF file instead and the issue will
# go away.
#
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', '..', 'lib'))
require "prawn"

Prawn::Document.generate "euro.pdf" do
  text "A Euro! € ©", :size => 32
end