1
0
Fork 0
mirror of https://github.com/Ellpeck/MLEM.git synced 2024-12-25 01:39:23 +01:00

use measurechar where applicable

This commit is contained in:
Ellpeck 2020-06-20 01:20:39 +02:00
parent 90e0ff55d1
commit 73f2e1c565

View file

@ -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;
}
}
}