I’m looking to create a BitmapFont similar to the one in MonoGame.Extended. Though, I don’t get any AA when drawing the letters. (It works perfectly fine with the implementation in MG Extended).
Here’s an extract of my code:
int currentPos = 0;
for (int i = 0; i < text.Length; i++)
{
Glyph glyph = Info.Glyphs.First(x => x.CharId == text[i]);
Rectangle glyphRect = glyph.GetRect();
_spriteBatch.Draw(_textureFont, new Vector2(currentPos + glyph.OffsetX, glyph.OffsetY), glyphRect, color);
currentPos += glyph.AdvanceX;
}
I looked pretty much at everything related AA and Sampling stuff I could find but everything I tried didn’t solve the issue. Note that I manually load my textures via Texture2D.FromStream(…) though it doesn’t seem to be the issue since when Saving back the file using SavePng, I get the original texture, so I doubt it’s even related to this.