From c023cb8783ba3f9d1ea7da3f09c281aedbc9de4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20Wallm=C3=A9nius?= Date: Sun, 19 Aug 2007 21:33:57 +0000 Subject: [PATCH] Revert previous 'fix' and implement the correct one, thanks markun! :-) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14396 a1c6a512-1295-4272-9138-f99709370657 --- apps/recorder/keyboard.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/recorder/keyboard.c b/apps/recorder/keyboard.c index b0901782ba..d3658c1bc7 100644 --- a/apps/recorder/keyboard.c +++ b/apps/recorder/keyboard.c @@ -378,10 +378,13 @@ int kbd_input(char* text, int buflen) } sc->setfont(pm->curfont); + pm->font_w = 0; /* reset font width */ /* find max width of keyboard glyphs */ for (i = 0; i < pm->nchars; i++) { - pm->font_w = font_get_width(pm->font, pm->kbd_buf[i]); + w = font_get_width(pm->font, pm->kbd_buf[i]); + if ( w > pm->font_w ) + pm->font_w = w; } /* Since we're going to be adding spaces, make sure that we check