1

I need to load this font file somehow, and apply it globally -- meaning everything would use this font; if that's not possible, at least tell me how I could load it in;

The resources I found were confusing, they give out no explanation and just give code.

enter image description here

Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135
Aleksas
  • 66
  • 8
  • 4
    Have you considered just installing the font on the user's system as part of your application installation? – B.O.B. Dec 09 '21 at 20:43
  • 1
    Also, not sure if this is still relevant: https://stackoverflow.com/questions/3027963/how-can-i-embed-font-in-visual-basic-net-application <- the solution provided is in VB but should be easy enough to convert to C#. – B.O.B. Dec 09 '21 at 20:45
  • 1
    Don't use resources for fonts, install them in the S.O. – Leandro Bardelli Dec 10 '21 at 01:54
  • https://stackoverflow.com/questions/556147/how-do-i-embed-my-own-fonts-in-a-winforms-app – Hans Passant Dec 11 '21 at 10:50

1 Answers1

-1

I found a solution, but it's not what you expect, it's just too difficult to load that font file from resources and make it useful, and besides, it was inevitable that I'd stop using resources.

What I did, was simply create a folder in %appdata%, and store all my assets there like fonts, animations, whatever.

I simply stopped using resources, because it's not that good for scalability, as when you start needing animations and all, it's hard to organize everything.

Now I simply have all the paths stored in a variable (that I can easily swap around), and load everything from the %appdata% folder; making the software usable for others is just as simple as making an installer and installing all the necessary assets in %appdata% folder.

Aleksas
  • 66
  • 8