mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 22:25: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,10 +218,9 @@ TextCache* Font::buildTextCache(const std::string& text,
|
|||
if (!segment.doShape && character == '\n') {
|
||||
y += getHeight(lineSpacing);
|
||||
x = offset[0] +
|
||||
(xLen != 0 ? getNewlineStartOffset(text,
|
||||
static_cast<const unsigned int>(
|
||||
cursor) /* cursor is already advanced */,
|
||||
xLen, alignment) :
|
||||
(xLen != 0 ? getNewlineStartOffset(
|
||||
text, static_cast<const unsigned int>(segment.startPos + 1),
|
||||
xLen, alignment) :
|
||||
0);
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue