From 018acd52c0b98027233a6c201222b66996528bb0 Mon Sep 17 00:00:00 2001 From: mrwastl Date: Fri, 3 Jun 2011 01:35:35 +0200 Subject: scrolling should be smooth again --- glcdgraphics/bitmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glcdgraphics/bitmap.c b/glcdgraphics/bitmap.c index a1ca735..9080ec4 100644 --- a/glcdgraphics/bitmap.c +++ b/glcdgraphics/bitmap.c @@ -595,10 +595,10 @@ int cBitmap::DrawText(int x, int y, int xmax, const std::string & text, const cF if (skipPixels >= font->Width(text)) start = text.length(); else - { + { unsigned int tmp = start; cFont::EncodedCharAdjustCounter(font->IsUTF8(), text, c, tmp); - while (skipPixels > font->Width(c /*text[start]*/)) + while (skipPixels > font->SpaceBetween() + font->Width(text.substr(start), 1 /*text[start]*/)) { cFont::EncodedCharAdjustCounter(font->IsUTF8(), text, c, start); skipPixels -= font->Width(c/*text[start]*/); -- cgit v1.2.3