1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-22 22:13:35 +02:00

revert text fix

This commit is contained in:
Laserlicht 2024-12-02 22:36:49 +01:00 committed by GitHub
parent 150f4904ab
commit f6b37dbca2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -117,14 +117,7 @@ std::vector<std::string> CMessage::breakText(std::string text, size_t maxLineWid
color = "";
}
else
{
std::string character = "";
character.append(text.data() + currPos, symbolSize);
if(fontPtr->getStringWidth(printableString + character) > maxLineWidth)
break;
printableString += character;
}
printableString.append(text.data() + currPos, symbolSize);
currPos += symbolSize;
}