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

View file

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