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\$
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\$
  • \$\begingroup\$ Thank you, this approach worked however I did also have to change each fonts Build Action to "Content". \$\endgroup\$ – Nexuz Oct 9 '14 at 9:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.