mirror of
https://github.com/Ellpeck/MLEM.git
synced 2024-06-04 22:23:37 +02:00
fixed the new MeasureString in GenericFont not returning an empty size for empty strings
This commit is contained in:
parent
64b9246aa5
commit
7eaa1da860
|
@ -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