title: Prawn: Print unicode string in PDF
body: <p>I'm using Prawn to generate PDFs in a Rails 3 app.</p>
  
  <p>Is it possible to print a Unicode string into a PDF like in a HTML view?</p>
  
  <p>For example,</p>
  
  <pre><code>&lt;%= raw "unicode_for_&amp;#x0F40;" %&gt;
  </code></pre>
  
  <p>in <code>show.html.erb</code> results in the glyph &#x0F40; while</p>
  
  <pre><code>pdf.text raw "unicode_for_&amp;#x0F40;"
  </code></pre>
  
  <p>in <code>show.pdf.prawn</code> results in the string <code>"unicode_for_&amp;#x0F40;"</code></p>
  
  <p>Tried in <code>show.pdf.prawn</code>:</p>
  
  <pre><code>    pdf.font "#{Prawn::BASEDIR}/data/fonts/TibMachUni-1.901b.ttf" do
        pdf.text raw "unicode_for_&amp;#x0F40;"
      end
  </code></pre>
  
  <p>and</p>
  
  <pre><code>    pdf.font_families.update("TibMachUni" =&gt; {:normal =&gt; "#{Prawn::BASEDIR}/data/fonts/TibMachUni-1.901b.ttf" })
      pdf.font("TibMachUni") do 
        pdf.text raw "unicode_for_&amp;#x0F40;"
      end
  </code></pre>
  
  <p>This did not solve the problem.</p>