Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm planning on my game using multiple backgrounds so I'm trying to use spritefonts to draw the text. Every time I load my spritefont I get a error.

Line1 = content.Load<SpriteFont>("Courier New");
Line2 = content.Load<SpriteFont>("Courier New");

This is the error I get.

Error loading "Courier New". File not found.

Although this was the font listed on the official microsoft website

share|improve this question
Have you actually imported the font into your project through visual studio? – ssb Nov 10 '12 at 13:15
try this , its a msdn tutorial to load and using the spritefont . pls check this too if u r begineer – Eldho May 29 '13 at 14:27

You have to add new a new SpriteFont item to your content project. Inside the .spritefont file, there is FontName element. Replace the default value with Courier New.

Take note of the asset name of the .spritefont file you added. Because that is the name you should reference inside your game. Assuming you named the asset as courier, you could load the font like this

SpriteFont Line1 = content.Load<SpriteFont>("courier");
share|improve this answer

You can only load content that's in your Content project. Since there isn't any file with the name "Courier New" (.ttf, or whatever) in your Content project, it's natural you'd get a File not found error.

You can't just load system fonts. The example in the official Microsoft website just needed an example font name. For their situation to work, they'd need a "Courier New.ttf" (or something) in the corresponding Content project.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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