1

When the program starts I make the download of the font to a specific path.

It's

"C:/Videowall_INFO/fonts/MyFont.ttf"

then I try to use it in XAML like this:

FontFamily="C:/Videowall_INFO/fonts/MyFont.ttf#MyFont"

Am I missing something? Becasuse its not showing in Designer or Runtime.

  • 1
    Possible duplicate of [How to include external font in WPF application without installing it](https://stackoverflow.com/questions/6453640/how-to-include-external-font-in-wpf-application-without-installing-it)? – dsdel Apr 11 '18 at 10:33
  • But I need to download it every time the App Starts. – Mauro Caiado Apr 11 '18 at 10:55
  • Did you try putting this in: C:/Videowall_INFO/fonts/MyFont.ttf#MyFont and referencing with FontFamily="{StaticResource MyFont}" - in a little test Project there was no Exception thrown as long as the font is not referenced by the StaticResource and the file does not exist – dsdel Apr 11 '18 at 11:23

1 Answers1

0

So I just found that the problem was the ".ttf" file that was corrupted after the download.

And this is the correct way of setting the path:

FontFamily="C:/Videowall_INFO/fonts/#MyFont"

Just removed the "MyFont.ttf" and it Works fine!

Thanks!