# How do I draw non-smoothed fonts in MonoGame 3.5?

I don't want to smooth the tiny fonts I'm building but even disabling ClearType system wide doesn't let me create SpriteFont files with sharp characters. There doesn't seem to be an option for smoothing in the .spritefont file I could set to "disabled". Are there any configs that affect how spritefonts are generated?

I'm using MonoGame 3.5 with Visual Studio 2015 and building the spritefonts via Content.mgcb thing that is added automatically into a MonoGame project.

I tried using Give Your Fonts Mono(spacing) tool but it doesn't have an option to disable smoothing.

Trying to follow this tutorial with BMFont generator and added the reference in the example, but the MonoGame.Extended thing doesn't appear and instead of automatically recognized importer I get [missing] [null]. After that I tried adding some other packages that come with MonoGame pipeline DLLs but no luck.

Tried to use XNA Content Compiler but it throws me an exception with some important object contentBuilder being null. Installing XNA framework doesn't fix the issue.

If there are ways to draw text without using SpriteFonts that allow to use non-smoothed characters, I'd like to know how.

• I'm the author of the MonoGame.Extended project. I can assure you it does work but it can be a bit fiddly to setup with the Pipeline tool. The most likely reason is that you're using MonoGame 3.5 with an old version of MG.Ex or visa-versa. If you do want to get it working I'm happy to help. Just post an issue on our forums or github issues page. – craftworkgames Apr 3 '16 at 4:28

I decided to pursue the BMFont path, it turned out that MonoGame Pipeline works just fine even if the format is displayed as [missing] [null]. All I had to do was add using MonoGame.Extended.BitmapFonts; to the top of my .cs files and swap SpriteFont with BitmapFont for everything to work perfectly.

• Great. I'm glad you got it working. I'm a bit surprised about the [missing] [null] issue. Maybe that'll go away next time you open the Pipeline tool? Btw you can accept your own answer. – craftworkgames Apr 3 '16 at 10:55
• Huh, it did resolve automatically the next time I opened the Pipeline tool. Interesting. Gotta wait 2 days before I can accept my answer tho :p – user1306322 Apr 3 '16 at 11:10

It's possible that the problem isn't actually the font itself but the way you're rendering it with a sprite batch. Have you tried setting the sampler state to point clamp?

_spriteBatch.Begin(samplerState: SamplerState.PointClamp);


Btw, without any code to look at or a screenshot it's difficult to say what the problem might be. If this isn't the answer, please update you're question with some more details and I'll have another go at it.

• This is the screenshot of Verdana size 8 in PointClamp mode. The mode isn't the issue because the font has smoothed pixels even at such a small size. What I want is this, which BMFont generated very well and without any smoothing. I'd like to make it work, should I post on the forums about the importer recognition problem? – user1306322 Apr 3 '16 at 10:11
• Looks like I forgot to include using MonoGame.Extended.BitmapFonts; and change SpriteFont to BitmapFont. It works just fine after that. – user1306322 Apr 3 '16 at 10:36

You can try to set the TextureFormat to NoChange in the Content Pipeline app for your sprite fonts. That's what I do for all of my assets. I don't want to lose quality due to compression. Also there's some sprite font problem going on in the MonoGame repo on GitHub, they will be fixing it this week.