问题
Is there any way to include font to a clickOnce installation of a winforms application in visual studio. The program that we are developing requires a font that is not installed in windows by default.
回答1:
You can load the font into a res file and have it loaded without being installed to the computer.
See:
- MS: Packaging fonts with applications
- Bob Powell: Embed Fonts
回答2:
Can you create a setup & deployment project to install the font, and deploy it as a prerequisite to the ClickOnce application. You can turn it into a custom prerequisite by using the Bootstrapper Manifest Generator to create the prerequisite package, copy into the VS packages folder, and it will show up in Visual Studio as a prerequisite.
回答3:
For anyone who stumbles on this in the future: There is a similar topic with more up-to-date and more detailed answers regarding this issue- Embedding/deploying custom font in .NET app
来源:https://stackoverflow.com/questions/2124625/how-to-include-font-to-clickonce-installation