<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -5,7 +5,13 @@ require &quot;prawn&quot;
 
 start = Time.now
 Prawn::Document.generate(&quot;chinese_flow.pdf&quot;) do  
-  font &quot;#{Prawn::BASEDIR}/data/fonts/gkai00mp.ttf&quot;
+  font &quot;#{Prawn::BASEDIR}/data/fonts/gkai00mp.ttf&quot;   
+  text_options.update(:wrap =&gt; :character, :size =&gt; 16)
   long_text = &quot;&#26356;&#21487;&#24597;&#30340;&#26159;&#65292;&#21516;&#36136;&#21270;&#31454;&#20105;&#23545;&#25163;&#21487;&#20197;&#25353;&#29031;URL&#20013;&#21518;&#38754;&#36825;&#20010;ID&#26469;&#36941;&#21382;&#24744;&#30340;DB&#20013;&#30340;&#20869;&#23481;&#65292;&#20889;&#20010;&#23567;&#29228;&#34411;&#25226;&#20320;&#30340;&#39029;&#38754;&#19978;&#30340;&#20851;&#38190;&#20449;&#24687;&#39034;&#27425;&#29228;&#19979;&#26469;&#20063;&#19981;&#26159;&#20160;&#20040;&#38590;&#20107;&#65292;&#36825;&#26679;&#30340;&#35805;&#65292;&#20320;&#23601;&#38750;&#24120;&#34987;&#21160;&#20102;&#12290;&#20889;&#20010;&#23567;&#29228;&#34411;&#25226;&#20320;&#30340;&#39029;&#38754;&#19978;&#30340;&#20851;&#38190;&#20449;&#24687;&#39034;&#27425;&#29228;&#19979;&#26469;&#20063;&#19981;&#26159;&#20160;&#20040;&#38590;&#20107;&#20889;&#20010;&#23567;&#29228;&#34411;&#25226;&#20320;&#30340;&#39029;&#38754;&#19978;&#30340;&#20851;&#38190;&#20449;&#24687;&#39034;&#27425;&#29228;&#19979;&#26469;&#20063;&#19981;&#26159;&#20160;&#20040;&#38590;&#20107;&#20889;&#20010;&#23567;&#29228;&#34411;&#25226;&#20320;&#30340;&#39029;&#38754;&#19978;&#30340;&#20851;&#38190;&#20449;&#24687;&#39034;&#27425;&#29228;&#19979;&#26469;&#20063;&#19981;&#26159;&#20160;&#20040;&#38590;&#20107;&#20889;&#20010;&#23567;&#29228;&#34411;&#25226;&#20320;&#30340;&#39029;&#38754;&#19978;&#30340;&#20851;&#38190;&#20449;&#24687;&#39034;&#27425;&#29228;&#19979;&#26469;&#20063;&#19981;&#26159;&#20160;&#20040;&#38590;&#20107;&#20889;&#20010;&#23567;&#29228;&#34411;&#25226;&#20320;&#30340;&#39029;&#38754;&#19978;&#30340;&#20851;&#38190;&#20449;&#24687;&#39034;&#27425;&#29228;&#19979;&#26469;&#20063;&#19981;&#26159;&#20160;&#20040;&#38590;&#20107;&#20889;&#20010;&#23567;&#29228;&#34411;&#25226;&#20320;&#30340;&#39029;&#38754;&#19978;&#30340;&#20851;&#38190;&#20449;&#24687;&#39034;&#27425;&#29228;&#19979;&#26469;&#20063;&#19981;&#26159;&#20160;&#20040;&#38590;&#20107;&#20889;&#20010;&#23567;&#29228;&#34411;&#25226;&#20320;&#30340;&#39029;&#38754;&#19978;&#30340;&#20851;&#38190;&#20449;&#24687;&#39034;&#27425;&#29228;&#19979;&#26469;&#20063;&#19981;&#26159;&#20160;&#20040;&#38590;&#20107;&#20889;&#20010;&#23567;&#29228;&#34411;&#25226;&#20320;&#30340;&#39029;&#38754;&#19978;&#30340;&#20851;&#38190;&#20449;&#24687;&#39034;&#27425;&#29228;&#19979;&#26469;&#20063;&#19981;&#26159;&#20160;&#20040;&#38590;&#20107;&#20889;&#20010;&#23567;&#29228;&#34411;&#25226;&#20320;&#30340;&#39029;&#38754;&#19978;&#30340;&#20851;&#38190;&#20449;&#24687;&#39034;&#27425;&#29228;&#19979;&#26469;&#20063;&#19981;&#26159;&#20160;&#20040;&#38590;&#20107;&#20889;&#20010;&#23567;&#29228;&#34411;&#25226;&#20320;&#30340;&#39029;&#38754;&#19978;&#30340;&#20851;&#38190;&#20449;&#24687;&#39034;&#27425;&#29228;&#19979;&#26469;&#20063;&#19981;&#26159;&#20160;&#20040;&#38590;&#20107;&#20889;&#20010;&#23567;&#29228;&#34411;&#25226;&#20320;&#30340;&#39029;&#38754;&#19978;&#30340;&#20851;&#38190;&#20449;&#24687;&#39034;&#27425;&#29228;&#19979;&#26469;&#20063;&#19981;&#26159;&#20160;&#20040;&#38590;&#20107;&quot;                                                       
-  text long_text, :wrap =&gt; :character 
+  text long_text
+  
+  # be sure to restore space based wrapping when dealing with latin scripts
+  text_options.update(:wrap =&gt; :spaces)
+  long_text = &quot;Text with some spaces &quot; * 25
+  text long_text
 end</diff>
      <filename>examples/chinese_text_wrapping.rb</filename>
    </modified>
    <modified>
      <diff>@@ -21,7 +21,7 @@ module Prawn
     include PageGeometry                             
     
     attr_accessor :y, :margin_box
-    attr_reader   :margins, :page_size, :page_layout
+    attr_reader   :margins, :page_size, :page_layout, :text_options
       
     # Creates and renders a PDF document. 
     #
@@ -79,6 +79,7 @@ module Prawn
        @page_layout     = options[:page_layout] || :portrait
        @compress        = options[:compress] || false                
        @skip_encoding   = options[:skip_encoding]
+       @text_options    = options[:text_options] || {}
              
        @margins = { :left   =&gt; options[:left_margin]   || 36,
                     :right  =&gt; options[:right_margin]  || 36,  </diff>
      <filename>lib/prawn/document.rb</filename>
    </modified>
    <modified>
      <diff>@@ -42,11 +42,13 @@ module Prawn
       # If an empty box is rendered to your PDF instead of the character you 
       # wanted it usually means the current font doesn't include that character.
       #
-      def text(text,options={})
+      def text(text,options={})            
         # we'll be messing with the strings encoding, don't change the users
         # original string
         text = text.dup                    
         
+        options = text_options.merge(options)  
+        
         original_font  = font.name                                              
         
         if options[:style]  </diff>
      <filename>lib/prawn/document/text.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>120aad1401ec1d51f655b4ca71af7621428d86b8</id>
    </parent>
  </parents>
  <author>
    <name>Gregory Brown</name>
    <email>gregory.t.brown@gmail.com</email>
  </author>
  <url>http://github.com/sandal/prawn/commit/a0ab8506c98b78e95e4e7f07031a68a2d8127c21</url>
  <id>a0ab8506c98b78e95e4e7f07031a68a2d8127c21</id>
  <committed-date>2008-08-20T14:57:14-07:00</committed-date>
  <authored-date>2008-08-20T14:57:14-07:00</authored-date>
  <message>Add text_options and show it in example [#67]</message>
  <tree>69dc18d18910c9c8c8c71bdcc9f4cc51d0037a27</tree>
  <committer>
    <name>Gregory Brown</name>
    <email>gregory.t.brown@gmail.com</email>
  </committer>
</commit>
