title: How do I change font in Prawn
body: <p>What I'm trying to do is generate a PDF using Prawn, while having some language specific characters.</p>
  
  <p>And as a result I'm getting the following error:</p>
  
  <pre><code>raise Prawn::Errors::IncompatibleStringEncoding,
     "Your document includes text that's not compatible with the  Windows-1252 character set.\n" \
     "If you need full UTF-8 support, use TTF fonts instead of PDF's built-in fonts\n."
  </code></pre>
  
  <p>So I tried changing the font by doing this:</p>
  
  <pre><code># app/models/prawn/change_font_decorator.rb
  
  Prawn::Document.generate("output.pdf") do
    font_families.update("Arial" =&gt; {
      :normal =&gt; Rails.root.join("app/assets/fonts/OpenSans-Regular.ttf"),
      :italic =&gt; Rails.root.join("app/assets/fonts/OpenSans-Regular.ttf"),
      :bold =&gt; Rails.root.join("app/assets/fonts/OpenSans-Regular.ttf"),
      :bold_italic =&gt; Rails.root.join("app/assets/fonts/OpenSans-Regular.ttf")
    })
    font "Arial"
  end
  </code></pre>
  
  <p>Yet, I'm getting the same error when trying to generate a PDF file.</p>
  
  <p>Any ideas on how to solve this?</p>