From bdb105043ea3edbcd41aa1410aa835fee20efb6f Mon Sep 17 00:00:00 2001 From: Pieter Hulshoff Date: Sun, 4 Sep 2016 11:41:44 +0200 Subject: [PATCH] Fixed vertical alignment for certain strings that are too long to fit the image width. --- RetroFE/Source/Graphics/Component/Text.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/RetroFE/Source/Graphics/Component/Text.cpp b/RetroFE/Source/Graphics/Component/Text.cpp index 57b7ee8..35704ec 100644 --- a/RetroFE/Source/Graphics/Component/Text.cpp +++ b/RetroFE/Source/Graphics/Component/Text.cpp @@ -79,7 +79,6 @@ void Text::draw() float scale = (float)baseViewInfo.FontSize / (float)imageHeight; unsigned int textIndexMax = 0; - unsigned int emptySpace = 0; // determine image width for(unsigned int i = 0; i < textData_.size(); ++i) @@ -94,12 +93,10 @@ void Text::draw() if ((imageWidth + glyph.advance)*scale > imageMaxWidth ) { - imageWidth -= emptySpace; break; } textIndexMax = i; - emptySpace = glyph.advance - glyph.maxX; imageWidth += glyph.advance; }