What is the best way to embed a truetype font within the application i'm developing? Basically i want to make sure a particular font is available to my application when installed on another machine. I have the *.ttf font file and just need a way of embedding it or automatically installing it when the application is run.
Do i need to set the installation program to install the font during installation or can i dynamically load the font during runtime of the application? In fact both would be nice to know.
The application is being developed in C# using .NET 2.0.
Embed fonts in a document or presentation Open the file you want to embed fonts in. On the application (PowerPoint or Word) menu, select Preferences. In the dialog box, under Output and Sharing, select Save. Under Font Embedding, select Embed fonts in the file.
Font embedding is the inclusion of font files inside an electronic document. Keep in mind the following: You may not have the printing rights for a font. Some fonts are screen fonts meaning they cannot be used for print and you will not be able to embed them in your PDF.
This blog post should help you.
Basically you add the font as an embedded resource then load it into a PrivateFontCollection object.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With