Monday, August 31, 2015

xna - How to generate Spritefonts for monogame


I just want to render some text to the screen using:




  • monogame 3.0

  • MS Visual Studio 2010 C# Express


In XNA, you were able to add fonts to the content pipeline quite easily. But this doesn't seem to be the case in monogame. Loading TTF Files using Content.Load() doesn't work. Is there any way to generate or download *.spritefont files or *.xnb files containing the font data (without resorting to install XNA)?



Answer



An alternative is to use pre-generated bitmap fonts instead. Here's a tutorial I wrote a while back on using the BMFont tool to get text into your game using the MonoGame.Extended library.


http://dylanwilson.net/bmfont-rendering-with-monogame-extended


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...