<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>data/encodings/win_ansi.txt</filename>
    </added>
    <added>
      <filename>examples/euro.rb</filename>
    </added>
    <added>
      <filename>lib/prawn/encoding.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,73 +1,3 @@
-1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-14
-15
-16
-17
-18
-19
-20
-21
-22
-23
-24
-25
-26
-27
-28
-29
-30
-31
-32
-33
-34
-35
-36
-37
-38
-39
-40
-41
-42
-43
-44
-45
-46
-47
-48
-49
-50
-51
-52
-53
-54
-55
-56
-57
-58
-59
-60
-61
-62
-63
-64
-65
-66
-67
-
-	
-
 # encoding: utf-8
  
 # prawn.rb : A library for PDF generation in Ruby
@@ -76,11 +6,11 @@
 #
 # This is free software. Please see the LICENSE and COPYING files for details.
            
-%w[font_ttf].each do |dep|
+%w[ttfunk/lib].each do |dep|
   $LOAD_PATH.unshift(File.dirname(__FILE__) + &quot;/../vendor/#{dep}&quot;)
 end
  
-require 'ttf'
+require 'ttfunk'
  
 module Prawn
   file = __FILE__</diff>
      <filename>lib/prawn.rb</filename>
    </modified>
    <modified>
      <diff>@@ -237,16 +237,11 @@ module Prawn
     
     # built-in fonts only work with latin encoding, so translate the string
     def normalize_builtin_encoding(text)
-      if text.respond_to?(:encode!)
-        text.encode!(&quot;ISO-8859-1&quot;)
-      else
-        require 'iconv'
-        text.replace Iconv.conv('ISO-8859-1//TRANSLIT', 'utf-8', text)
-      end
-    rescue
-      raise Prawn::Errors::IncompatibleStringEncoding, &quot;When using a &quot; +
-          &quot;builtin font, only characters that exist in &quot; +
-          &quot;WinAnsi/ISO-8859-1 are allowed.&quot;
+      enc = Prawn::Encoding::WinAnsi.new
+      text.replace text.unpack(&quot;U*&quot;).collect { |i| enc[i] }.pack(&quot;C*&quot;)
+    rescue 
+       raise Prawn::Errors::IncompatibleStringEncoding, &quot;The string you &quot; +
+        &quot;are attempting to render is not encoded in valid UTF-8.&quot;
     end
 
     def normalize_ttf_encoding(text)</diff>
      <filename>lib/prawn/font.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>65d093dd500a9feda913fc0ec304faae9b573bd6</id>
    </parent>
  </parents>
  <author>
    <name>James Healy</name>
    <email>jimmy@deefa.com</email>
  </author>
  <url>http://github.com/sandal/prawn/commit/bb13bce6cd82db2b681b6acbe84d8d070d141cda</url>
  <id>bb13bce6cd82db2b681b6acbe84d8d070d141cda</id>
  <committed-date>2008-12-02T08:18:42-08:00</committed-date>
  <authored-date>2008-09-28T03:06:37-07:00</authored-date>
  <message>Handle the conversion from UTF-8 to WinAnsi ourselves
- using iconv was convenient, but there are enough differences between
  ISO-8859-1 andthe PDF WinAnsiEncoding that it was worth doing things
  ourselves

  (From Greg: I changed the implementation a little, class variables are evil,
   and behave different on different versions of Ruby)</message>
  <tree>df2d8ce3f1d727c36a752d9da7a6053c7a1da3b2</tree>
  <committer>
    <name>Gregory Brown</name>
    <email>gregory.t.brown@gmail.com</email>
  </committer>
</commit>
