mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-26 08:05:38 +00:00
Fixed an issue where text was not correctly centered after line breaks
This commit is contained in:
parent
c87d2e7584
commit
908788da25
|
@ -218,9 +218,8 @@ TextCache* Font::buildTextCache(const std::string& text,
|
||||||
if (!segment.doShape && character == '\n') {
|
if (!segment.doShape && character == '\n') {
|
||||||
y += getHeight(lineSpacing);
|
y += getHeight(lineSpacing);
|
||||||
x = offset[0] +
|
x = offset[0] +
|
||||||
(xLen != 0 ? getNewlineStartOffset(text,
|
(xLen != 0 ? getNewlineStartOffset(
|
||||||
static_cast<const unsigned int>(
|
text, static_cast<const unsigned int>(segment.startPos + 1),
|
||||||
cursor) /* cursor is already advanced */,
|
|
||||||
xLen, alignment) :
|
xLen, alignment) :
|
||||||
0);
|
0);
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue