I wish to load and use a font to a desktop application in C#. It's that possible without installing the font on the system?
It's a kind of question like this but not from a DLL. I want to load from font file.
I wish to load and use a font to a desktop application in C#. It's that possible without installing the font on the system?
It's a kind of question like this but not from a DLL. I want to load from font file.
There's a class System.Drawing.Text.PrivateFontCollection in System.Drawing.dll which can manage fonts on a per application basis.
All you do is that you maintain this collection within your app and you add fonts through AddFontFile or AddMemoryFont and you'll then be able to use that font as if it was installed on your system.
It's like installing the font for the application only. The font will be uninstalled once the process terminates.