views:

158

answers:

3

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.

+2  A: 

You can load the font into a res file and have it loaded without being installed to the computer. See http://msdn.microsoft.com/en-us/library/ms753303.aspx and http://www.bobpowell.net/embedfonts.htm

Mitch
Unfortunately that won't help since we need to actually install the font on the computer.
Jargo
then perhaps you can p/invoke the function add font resource to install it if your program finds it missing. see http://www.pinvoke.net/default.aspx/gdi32.AddFontResource
Mitch
A: 

Don't think you can do it with ClickOnce, because of its limitations. You still can make a setup project with special font folder in it and custom written simple updater(a-la custom simple clickonce) if you want updates for example..

nihi_l_ist
A: 

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.

RobinDotNet