2
\$\begingroup\$

I am working on a Windows game for my university project. In this project I am using a custom TrueType font which is not installed on any university computers. For submission my game is required to run in debug mode and a demonstration given. Therefore is there any possible way to read the font from within my project rather than installing the font on each computer that the project will be viewed on.

\$\endgroup\$

1 Answer 1

3
\$\begingroup\$

Just build the XNB file on your personal machine, and use that file in your project.

Remove the .spritefont file from your content project. Then add the built XNB file to your game project, in an appropriate directory (generally "Content") and set its properties (select it and press F4) to "Copy if newer".

This is off the top of my head. So look at the output directory to see if it's working correctly.

\$\endgroup\$
1
  • \$\begingroup\$ Thank you, this approach worked however I did also have to change each fonts Build Action to "Content". \$\endgroup\$
    – Nexuz
    Oct 9, 2014 at 9:43

You must log in to answer this question.

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