Is Spritefont still supported? I’ve been searching the net and trying different suggestions, but still don’t have Spritefont available.
I tried what I thought could be a workaround - downloaded a ttf file, and loaded from content - but got an error. Does MG support TrueTypeFont? Would this method work if I used another font type? Or do I definitely need to get SpriteFont?
I noticed a thread referencing to a SpriteFont 2 installer , which I downloaded. Would this work? If I install it, do I the select ‘Add Existing Item’, and navigate to the folder it installs to? …not sure what to do.
This is as far as I can get. I don’t seem to have an app to edit it. Could you tell me what editor you use? Also, I noticed my items are limited in comparison to yours - not only yours, but others I have seen. Where can I get the effects items? Thanks
It creates a .spritefont file, which is an XML file. If you open this file in a text editor or in Visual Studio, you can edit the font name and point size. This is how it was done in XNA as well. We are discussing in another thread about the best approach to make a spritefont editor to provide a small GUI for this file to make it easier to edit.
I’m using Windows with Visual Studio and the official release of MonoGame 3.4 - everything is default settings for me. I can’t say why you have fewer options - a different platform, tools, or version, I presume.
I had read through that whole section, and I had been using the Content.mgcb, but there was nothing on SpriteFont, and I searched again, and found nothing. The reason I didn’t see the SpriteFont item was because I was only using ‘Add Existing Item’. However, Now I know where to find it.
I am using the latest MonoGame on VS2013 on a Windows Phone 8 XAML project. Like you said, maybe it is the platform, or it could be you are using VS2010.
Anyways, I appreciate the help.
I’m having problems as well. I’ve added the .spritefont file to content.mgcb. I also have the XNB files created. I’m having problems with the pipeline content tool crashing when I try building after adding an existing spritefont file. If I go to add new spritefont in the pipeline tool it works but when trying to load during runtime I get an error: “Could not load asset as a non-content file!”. Just really stuck at this point and would appreciate any help.
Edit: I’m using visual studio 2013 on Windows 7 and Windows 8.1. Same issue happens on both computers. I’m building the project for Windows.
Double Edit: I figured it out. I wasn’t using the correct content manager.
I don’t know how to help you with that. I was getting that error message when I tried loading other files before. What I could suggest you do is, start a new project, and just try loading the spritefont to see if the problem might be caused by something else.
I am assuming your code looks something like this:
public class Game1 : Game
protected override void LoadContent()
myFont = Content.Load<SpriteFont>("testFont");
Other than that, I would suggest you post your question as a new post, because it is slightly different to this post, which will allow you to get more of a response, and since no one seems to be responding to this one anymore. Hope you get through. I know how it feels to be stuck on something that causes you to wonder why it is not working. Xna is harder than I thought though.