title: Wicked PDF +fonts+heroku+rails3.2
body: <p>I'm using <a href="http://rubygems.org/gems/wicked_pdf" rel="nofollow">wicked_pdf</a> with rails 3.2.11 and ruby 1.9.3 to generate a PDF from HTML and deploying to Heroku.</p>
  
  <p>My pdf.css.scss.erb: </p>
  
  <pre><code>&lt;% app_fullhost = Constants["app_fullhost"] %&gt;
  
  @font-face {
    font-family:'DosisMedium'; font-style:normal; font-weight:500;
    src: url(&lt;%=app_fullhost%&gt;/app/font/dosis/Dosis-Medium.ttf) format('woff');
  }
  
  *, body {
    font-family: "DosisLight", 'Times New Roman', 'Arial', sans-serif;
  } 
  </code></pre>
  
  <p>where <code>app_fullhost</code> is the exact host, in development or production. </p>
  
  <p>My pdf layout includes among other things :</p>
  
  <pre><code>%html{:lang =&gt; I18n.locale}
    %head
      %meta{:charset =&gt; "utf-8"}
      %title= content_for?(:title) ? yield(:title) : Settings.app_name
      = wicked_pdf_stylesheet_link_tag "pdf"
  </code></pre>
  
  <p>In production.rb I have </p>
  
  <pre><code>config.assets.precompile +=%w(pdf.css)
  </code></pre>
  
  <p>This works without problems in development, but on Heroku the pdf file doesn't load the desired font. I have also tried different solutions like adding these in production.rb:</p>
  
  <pre><code>config.assets.paths &lt;&lt; "#{Rails.root}/app/assets/fonts"
  config.assets.precompile += %w(*.svg *.eot *.woff *.ttf) 
  config.assets.precompile += %w(.svg .eot .woff .ttf) 
  </code></pre>
  
  <p>and I tried also to change ( in pdf.css.scss.erb ) :</p>
  
  <pre><code>@font-face {
    font-family:'Dosis'; font-style:normal; font-weight:500;
    src: url('Dosis-Medium.ttf') format('woff');
  }
  </code></pre>
  
  <p>or</p>
  
  <pre><code>@font-face {
    font-family:'Dosis'; font-style:normal; font-weight:500;
    src: url(&lt;%= asset_path('Dosis-Medium.ttf')%&gt;) format('woff');
  }
  </code></pre>
  
  <p>The fonts are in <code>assets/fonts</code> and also in <code>public/app/font/dosis</code> and url on Heroku respond correctly with:</p>
  
  <pre><code>..//myapp/app/font/dosis/Dosis-Medium.ttf" and 
  ..//myapp/assets/Dosis-Medium.ttf 
  </code></pre>
  
  <p>How can I get the font to load on Heroku?</p>