public static void DrawString(this SpriteBatch spriteBatch, BorderedFont font, string text, Vector2 position, Color innerColor, float rotation, Vector2 origin, float scale) { //These changes seem to make the text end up in the same(ish) place as DrawString for SpriteFont origin.Y -= font.Inner.AboveLineSize; origin.X += font.Inner.SpaceWidth * 0.5f; font.Inner.DrawString(spriteBatch, text, position, innerColor, rotation, origin, scale); }
/// <summary> /// Adds a string to a batch of sprites for rendering using the specified font, text, position, and color. /// </summary> public static void DrawString(this SpriteBatch spriteBatch, BorderedFont font, string text, Vector2 position, Color innerColor) { DrawString(spriteBatch, font, text, position, innerColor, 0, Vector2.Zero, 1); }