diff options
Diffstat (limited to 'firmware/drivers/lcd-recorder.c')
-rw-r--r-- | firmware/drivers/lcd-recorder.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c index be46d0e367..ea28e5cc2f 100644 --- a/firmware/drivers/lcd-recorder.c +++ b/firmware/drivers/lcd-recorder.c | |||
@@ -367,24 +367,7 @@ void lcd_setfont(int newfont) | |||
367 | 367 | ||
368 | int lcd_getstringsize(const unsigned char *str, int *w, int *h) | 368 | int lcd_getstringsize(const unsigned char *str, int *w, int *h) |
369 | { | 369 | { |
370 | struct font* pf = font_get(curfont); | 370 | return font_getstringsize(str, w, h, curfont); |
371 | int ch; | ||
372 | int width = 0; | ||
373 | |||
374 | while((ch = *str++)) { | ||
375 | /* check input range*/ | ||
376 | if (ch < pf->firstchar || ch >= pf->firstchar+pf->size) | ||
377 | ch = pf->defaultchar; | ||
378 | ch -= pf->firstchar; | ||
379 | |||
380 | /* get proportional width and glyph bits*/ | ||
381 | width += pf->width? pf->width[ch]: pf->maxwidth; | ||
382 | } | ||
383 | if ( w ) | ||
384 | *w = width; | ||
385 | if ( h ) | ||
386 | *h = pf->height; | ||
387 | return width; | ||
388 | } | 371 | } |
389 | 372 | ||
390 | /* put a string at a given char position */ | 373 | /* put a string at a given char position */ |