|
@@ -507,8 +507,12 @@ std::vector<Font::DrawCommand> Font::generateVerticesFormatted(const love::font:
|
|
|
auto start = text.cps.begin() + range.getOffset();
|
|
|
auto end = start + range.getSize();
|
|
|
float numspaces = std::count(start, end, ' ');
|
|
|
+
|
|
|
+ if (text.cps[range.last] == ' ')
|
|
|
+ --numspaces;
|
|
|
+
|
|
|
if (width < wrap && numspaces >= 1)
|
|
|
- extraspacing = (wrap - width) / (numspaces - 1);
|
|
|
+ extraspacing = (wrap - width) / numspaces;
|
|
|
else
|
|
|
extraspacing = 0.0f;
|
|
|
break;
|