title: Using a custom font in WPF
body: <p>I need my WPF app to use a true-type font for a different language. I have the font located in a folder called 'fonts' inside the project. The font I'm using is available for free download <a href="http://www.sjp.ac.lk/fa/cc/Sinhala%20Fonts/FM%20-%20Basuru%20x.TTF" rel="noreferrer">here</a></p>
  
  <p>Since the font is installed in my system i first tried</p>
  
  <pre><code> FontFamily="FMBasuru"
  </code></pre>
  
  <p>I've read the post <a href="https://stackoverflow.com/questions/358501/wpf-add-custom-font">here</a> and tried doing (this is the exact markup I'm using including font name)</p>
  
  <pre><code>&lt;Window.Resources&gt;
          &lt;Style x:Key="SinhalaFont"&gt;
              &lt;Setter Property="TextElement.FontFamily" Value="fonts/#FMBasuru"/&gt;
          &lt;/Style&gt;
      &lt;/Window.Resources&gt;
  </code></pre>
  
  <p>...</p>
  
  <pre><code> &lt;TextBlock  Style="{DynamicResource SinhalaFont}"&gt;r&lt;/TextBlock&gt;
  </code></pre>
  
  <p>...</p>
  
  <p>I made sure that I'm using the correct font name instead of the font filename.
  What could have I got wrong?</p>