This commit is contained in:
Rex 2024-10-08 05:56:33 +08:00
parent 03ce4cecad
commit cbca9ecf1f

View file

@ -53,7 +53,10 @@ var GetTextSize = function (text, size, lines)
lineWidth += context.measureText(line[j]).width;
}
lineWidth += letterSpacing * (line.length - 1);
if (line.length > 1)
{
lineWidth += letterSpacing * (line.length - 1);
}
}
// Adjust for wrapped text