From 73f2e1c565b7b1d07e66e74db603edec8af718cf Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 20 Jun 2020 01:20:39 +0200 Subject: [PATCH] use measurechar where applicable --- MLEM/Formatting/TokenizedString.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/MLEM/Formatting/TokenizedString.cs b/MLEM/Formatting/TokenizedString.cs index 5290811..1f9c8da 100644 --- a/MLEM/Formatting/TokenizedString.cs +++ b/MLEM/Formatting/TokenizedString.cs @@ -124,9 +124,8 @@ namespace MLEM.Formatting { if (i == 0) token.DrawSelf(time, batch, pos + innerOffset, font, color, scale, depth); - var cString = c.ToString(); - token.DrawCharacter(time, batch, c, cString, i, pos + innerOffset, drawFont, drawColor, scale, depth); - innerOffset.X += font.MeasureString(cString).X * scale; + token.DrawCharacter(time, batch, c, c.ToString(), i, pos + innerOffset, drawFont, drawColor, scale, depth); + innerOffset.X += font.MeasureChar(c).X * scale; } } }