Answers.Body: <p>You should put your site's assets (images, CSS, fonts, etc.) in your site's public HTML folder.</p>
  
  <p>If you put them into Craft's <code>templates</code> folder, then not only will you invoke Craft/PHP overhead when trying to serve those files (which will be significant instead of having your web server serve them directly), but "bad things" can happen when PHP tries to serve them (like you've discovered).</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-31T07:30:12.110Z
Answers.Text: Okay, thank you! By assets, do u mean css and js as well? because those work well in the templates folder so it seems!
Answers.UserDisplayName: Mathieu
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-31T21:14:45.957Z
Answers.Text: Those might work there, but still not recommended. :)
Answers.UserDisplayName: Brad Bell
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-29T23:19:02.427Z
Answers.LastActivityDate: 2018-03-29T23:19:02.427Z
Answers.UserDisplayName: Brad Bell
Body: <p>When i load my fonts with <code>@font-face</code> trough the <code>/templates/</code> folder, I get these errors:</p>
  
  <pre><code>Failed to decode downloaded font: &lt;URL&gt;
  OTS parsing error: Failed to convert WOFF 2.0 font to SFNT
  OTS parsing error: incorrect file size in WOFF header
  DevTools failed to parse SourceMap: http://crafttest.test/assets/css/css.css.map
  OTS parsing error: prep: table overruns end of file
  </code></pre>
  
  <p>However, if I put the fonts in the /public/ folder they work perfectly. What my question is, is the bad practice to put them there, and why is it throwing these errors in the /templates/ folder?</p>
  
  <p>Also: it's not a wrong url issue, tried changing it, and got a 404.</p>
  
Tags: <templating>
Title: Custom font issue
ThreadText: # Custom font issue
  
  (Asked by: username_0 on 2018-03-29)
  
  When i load my fonts with `@font-face` trough the `/templates/` folder, I get these errors:
  
  ```
  Failed to decode downloaded font: <URL>
  OTS parsing error: Failed to convert WOFF 2.0 font to SFNT
  OTS parsing error: incorrect file size in WOFF header
  DevTools failed to parse SourceMap: http://crafttest.test/assets/css/css.css.map
  OTS parsing error: prep: table overruns end of file
  
  ```
  
  However, if I put the fonts in the /public/ folder they work perfectly. What my question is, is the bad practice to put them there, and why is it throwing these errors in the /templates/ folder?
  
  Also: it's not a wrong url issue, tried changing it, and got a 404.
  
  **Tags:** templating
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-03-29. Score: 1 | Accepted answer
  
  You should put your site's assets (images, CSS, fonts, etc.) in your site's public HTML folder.
  
  If you put them into Craft's `templates` folder, then not only will you invoke Craft/PHP overhead when trying to serve those files (which will be significant instead of having your web server serve them directly), but "bad things" can happen when PHP tries to serve them (like you've discovered).
  
  > **Comments:**
  > **username_0**: Okay, thank you! By assets, do u mean css and js as well? because those work well in the templates folder so it seems!  
  > **username_1**: Those might work there, but still not recommended. :)  
  
  ---
  
  