mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-11-22 04:53:29 +01:00
fixed the new MeasureString in GenericFont not returning an empty size for empty strings
This commit is contained in:
parent
64b9246aa5
commit
7eaa1da860
1 changed files with 2 additions and 0 deletions
|
@ -88,6 +88,8 @@ namespace MLEM.Font {
|
|||
///<inheritdoc cref="SpriteFont.MeasureString(string)"/>
|
||||
public Vector2 MeasureString(string text) {
|
||||
var size = Vector2.Zero;
|
||||
if (text.Length <= 0)
|
||||
return size;
|
||||
var xOffset = 0F;
|
||||
foreach (var c in text) {
|
||||
switch (c) {
|
||||
|
|
Loading…
Reference in a new issue