Reverted a change in TextComponent as it caused unforeseen issues

This commit is contained in:
Leon Styhre 2024-08-03 21:20:28 +02:00
parent 2e01613e41
commit 5d653a9e93

View file

@ -484,7 +484,7 @@ void TextComponent::onTextChanged()
std::shared_ptr<Font> font {mFont};
// Used to initialize all glyphs, which is needed to populate mMaxGlyphHeight.
lineHeight = mFont->loadGlyphs(text) * mLineSpacing;
lineHeight = mFont->loadGlyphs(text + "\n") * mLineSpacing;
const bool isMultiline {mAutoCalcExtent.y == 1 || mSize.y * mRelativeScale > lineHeight};
float offsetY {0.0f};