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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.