-3

I need help with changeing the font of my label in wpf.

I opened a new folder called fonts, i put in there a font i found online, and now i want to change the content's font to the font i found online. I've tried looking online but i couldnt find any solutions about that.

I have another proggram which in there, it actually did change for me, and i did the exact same thing now, i really dont know what am i doing wrong.

I dont know why the font dosent change. can someone help me?

https://i.stack.imgur.com/LiroL.png

Azu
  • 5
  • In order for you to be able to use that font, it must be installed on the machine where your program will run. – 500 - Internal Server Error Sep 24 '21 at 17:33
  • @500-InternalServerError `In order for you to be able to use that font, it must be installed on the machine` I've used fonts without requiring installation. – Trevor Sep 24 '21 at 17:37
  • @zaggler: How did you determine that it wasn't installed? – 500 - Internal Server Error Sep 24 '21 at 17:40
  • @500-InternalServerError I didn't have to, it was a font that I created for testing. Anyways, @@Azu [see this answer](https://stackoverflow.com/a/39912794/1797425) it may be useful. – Trevor Sep 24 '21 at 18:07
  • Unless you have a specific reason for using label I would suggest you use a textblock instead. When you set content of a label to a string then a textblock is created by the label and it's text set to that string. There are some styling subtleties can cause complications. – Andy Sep 24 '21 at 18:28

1 Answers1

1

Take a look at the Microsoft documentation for packaging fonts with a WPF application. You're almost there. In your screenshot, it looks like you may have made a typo when specifying the FontFamily.

Andrew H
  • 875
  • 5
  • 20