Christofer Klassen
Christofer Klassen

Reputation: 157

SpriteFont rendering artefacts

I'm attempting to render a SpriteFont in MonoGame using the following code:

spriteBatch.DrawString(hudFont, "HP: " + p.Attributes.Hp + " / " + p.Attributes.MaxHp, EDGE_BUFFER, Color.White);

Where hudFont is loaded as a regular SpriteFont via the content manager. When I render the text on-screen, it looks like this:

Artefacts

I've never encountered this issue before and am at a loss for what might be causing it. Anyone have any insight?

Thanks!

Upvotes: 2

Views: 73

Answers (1)

Christofer Klassen
Christofer Klassen

Reputation: 157

Looks like I solved the problem by changing the TextureFormat setting of the SpriteFont to NoChange from within the MonoGame Pipeline tool.

Not sure what the problem was; I've never run into that issue with the default settings before!

Upvotes: 2

Related Questions