Whitespace characters in SpriteFonts have a width of 0, causing multi-word text to run together.
See examples in this thread from the forums:
http://community.monogame.net/t/font-spacing-issue/11030
I believe the problem might be in the Content Pipeline GlyphCropper object, which reduces the whitespace around characters in a bitmap font:
I think this is a duplicate of #6545. Or at least it's very closely related and about the same visible issue.
Im not sure this is a (or the) issue.
Technically a space character doesn't need to actually have a glyph width as it doesn't need to draw 8 10 or however many pixels of... nothing. It just needs to move the offset.X over to the right on the next pass.
The right side bering will do that before returning from the for loop at the end.
As long as the space character has either a positive left or right side bering (_it probably should be the right side bering though which as far as i know it always is_) it will position the next character properly.
The huge Y value on the space glyph cropping is however another matter it is improper. As it extends thru multiple lines and serves no purpose so it's not by design. It may or may not be innocuous but it is unexpected behavior. Also as shown in the other issue the expected fonts right side bering at least in one case was coming out wrong as well.
willmotil is right, a space glyph will most likely be empty on any font and it's the X/Y offset value that takes care of the actual spacing. It really depends on how the font is designed.
There may still be some issues in regard to #6545 because the font processor tries to overcrop glyph to take less space on the bitmap font.
Is there a workaroud for this bug? Idunno how other people aren't seeing it... Do most projects just not use a lot of text, or render text using something other than SpriteFont?
I've got a text-heavy game that I'm getting ready to ship, buteverythingisreallyhardtoread :( I'm afraid players are going to complain if I launch with this bug.
Have you tried to modify the font/ttf itself or to check if it's the font encoding? (e.g. trying another font to see how it renders)
Debug break and check the XAdvance value of your space glyph here:
https://github.com/MonoGame/MonoGame/blob/6f34eb393aa0ac005888d74c5c4c6ab5615fdc8c/MonoGame.Framework.Content.Pipeline/Graphics/Font/SharpFontImporter.cs#L153
If it's 0, it's a font issue.
Fair enough, it could be a font issue, but this font works elsewhere. I feel like I've seen this with common fonts like arial too... there is a space between words, but they are squished together almost like it isn't an actual space but just the kerning around the ' ' character.
I'll put together a quick example app to show the problem.
Ok, here is a simple sample app that writes some text to the screen with Arial Black. Above it is the same text, written with same font and font size, in WordPad. You can see that the spacing between words in MonoGame is incorrect, the words are too close together:

Thanks! I'll check what's wrong.
Most helpful comment
Thanks! I'll check what's wrong.