summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers')
-rw-r--r--firmware/drivers/lcd-h100.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/firmware/drivers/lcd-h100.c b/firmware/drivers/lcd-h100.c
index d27a62da41..157791d991 100644
--- a/firmware/drivers/lcd-h100.c
+++ b/firmware/drivers/lcd-h100.c
@@ -319,24 +319,7 @@ void lcd_setfont(int newfont)
319 319
320int lcd_getstringsize(const unsigned char *str, int *w, int *h) 320int lcd_getstringsize(const unsigned char *str, int *w, int *h)
321{ 321{
322 struct font* pf = font_get(curfont); 322 return font_getstringsize(str, w, h, curfont);
323 int ch;
324 int width = 0;
325
326 while((ch = *str++)) {
327 /* check input range*/
328 if (ch < pf->firstchar || ch >= pf->firstchar+pf->size)
329 ch = pf->defaultchar;
330 ch -= pf->firstchar;
331
332 /* get proportional width and glyph bits*/
333 width += pf->width? pf->width[ch]: pf->maxwidth;
334 }
335 if ( w )
336 *w = width;
337 if ( h )
338 *h = pf->height;
339 return width;
340} 323}
341 324
342/* put a string at a given char position */ 325/* put a string at a given char position */