0
\$\begingroup\$

I'm having a problem with fonts. As far as I can see from the very limited information on the SpriteFont, I should be able to add a font to my Content as a SpriteFont. However the SpriteFont doesn't exist in the Add New Item menu.

Has anyone else got around this problem?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

You don't specify which library you are using, XNA or monogame, so I'm assuming XNA; Adding a spritefont should be possible by right-clicking the content project, selecting Add -> New Item...

enter image description here

and then selecting Sprite Font

enter image description here

However, XNA is really built more with C# in mind (citation needed), so I'm not sure exactly if this process changes for VB.

Addendum

After creating a VB project, the same options appear for me as in C#. However, a thought occurs to me; Make sure to select the Root "Visual C#" treenode and not General, as only the bitmap option shows in General.

enter image description here

\$\endgroup\$
4
  • \$\begingroup\$ Yeah, the process is exactly as you have shown, but there isn't spritefont anywhere. In fact now you mention it Visual C# doesn't show at all in the Template list. (VB2015) \$\endgroup\$ Jan 25, 2016 at 10:50
  • \$\begingroup\$ I've just checked VB 2012 and it's the same. I wonder if the VB game template is missing a few things. \$\endgroup\$ Jan 25, 2016 at 10:52
  • \$\begingroup\$ My project references are all XNA, etc, so I guess XNA! I've installed Mono, but I think the template I found for VB only references xna. \$\endgroup\$ Jan 25, 2016 at 12:04
  • \$\begingroup\$ Ah, if you've installed monogame, it'll still reference XNA in most locations as it was built to be a direct replacement and all of it's namespaces mimic those of XNA. In the case of monogame, and my limited understanding of it, you have to create the spritefont outside of Visual Studio using a tool and import it afterwards. \$\endgroup\$
    – JonBee
    Jan 25, 2016 at 12:16

You must log in to answer this question.

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