0

I have imported a custom font and set it's Build Action as 'Recourse'. I can see the font listed here here.

When I try to apply it nothing happens. I tried to add it in <Application.Recourses>, in a <Style> as well as adding it as a content item or recourse item but nothing happens. Where is the problem and what should I do?

Zozo
  • 81
  • 2
  • 8
  • Do either of these posts answer your question? [Using a custom font in WPF](https://stackoverflow.com/q/3765647); [WPF - Add Custom Font](https://stackoverflow.com/q/358501) – greenjaed Apr 01 '21 at 20:36
  • There's a gotcha with custom fonts. Any reference with a relative path means a memory leak. If you do not see c:// in the path then it's relative. Google it. You pretty much need to install or write some code somewhere to load fonts without any leaks. – Andy Apr 01 '21 at 21:08

1 Answers1

0

Try to set the Build Action to Resource in the properties of the .ttf file

AAF
  • 21
  • 5