I have a couple of questions. Some of this I've done some research on, and some of it may be lacking, but any help is appreciated.

1) When distributing an XNA game for PC that uses custom fonts that I've installed on my Dev system - will they be usable on a client machine, or will that machine have to have that font installed?

2) What's the best practice for a)creating installers for XNA games for PC, and b)patching existing XNA game installations?

Thanks a lot.


1 Answer 1


1) If you're using SpriteFont of XNA (ContentPipeline) these SpriteFonts can be loaded by XNA (in the Content directory) via ContentManager.Load<SpriteFont>("AssetName") without having it installed on the client pc.
SpriteFont at MSDN

2) Install:

  • install XNA Redistributable on the PC
  • copy Application files to destination

An alternative would be ClickOnce Deployment (or the online deployment Visual Studio provides).

Patch: create diffs between updates and change the files based on that diff (ensure that the patch files are signed and can't be changed by a third-party)
or let the ClickOnce-Deployer do his job in AutoUpdating (you will find the option in Visual Studio)
Patching has to be secure otherwise your application might unintendedly be used by a third-party for his usage - which will never be good.

  • \$\begingroup\$ I use the .Load<SpriteFont>("name") syntax now to load my fonts - but, for example, when I ran the application for the first time on another machine, I had to reinstall the specified font before it would work... \$\endgroup\$
    – PugWrath
    Oct 12, 2013 at 16:05
  • \$\begingroup\$ then you don't have every font converted to a spritefont. If you compile the code on the other machine yes, then you need the fonts. If you're running the application with spritefonts only it does not require the fonts to be installed an the machine. \$\endgroup\$
    – AliveDevil
    Oct 12, 2013 at 16:53
  • \$\begingroup\$ Ah, ok - how can I convert fonts, (like .ttf format) to spritefont so that I don't need them installed? I will see if I can find this answer myself, also. EDIT: I think I understand what you're saying. If I compile the code on a machine with the fonts installed, then another machine should be able to run it regardless of the fonts it has installed. I will just test this some more. \$\endgroup\$
    – PugWrath
    Oct 15, 2013 at 15:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .