From 7c0fb2e980af93923f2071e1af087010962e06bd Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Fri, 26 Aug 2011 09:24:25 +0200 Subject: Import upstream version 0.11.0~svn1158 --- drv_generic_graphic.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'drv_generic_graphic.c') diff --git a/drv_generic_graphic.c b/drv_generic_graphic.c index cdc0129..b76bd1f 100644 --- a/drv_generic_graphic.c +++ b/drv_generic_graphic.c @@ -1,4 +1,4 @@ -/* $Id: drv_generic_graphic.c 1003 2009-03-26 08:11:33Z michux $ +/* $Id: drv_generic_graphic.c 1156 2011-07-27 05:41:42Z michael $ * $URL: https://ssl.bulix.org/svn/lcd4linux/trunk/drv_generic_graphic.c $ * * generic driver helper for graphic displays @@ -233,6 +233,7 @@ static void drv_generic_graphic_render(const int layer, const int row, const int const char *style, const char *txt) { int c, r, x, y, len; + int bold; /* sanity checks */ if (layer < 0 || layer >= LAYERS) { @@ -249,10 +250,17 @@ static void drv_generic_graphic_render(const int layer, const int row, const int c = col; /* render text into layout FB */ + bold = 0; while (*txt != '\0') { unsigned char *chr; - if (strstr(style, "bold") != NULL) { + /* magic char to toggle bold */ + if (*txt == '\a') { + bold ^= 1; + txt++; + continue; + } + if (bold || strstr(style, "bold") != NULL) { chr = Font_6x8_bold[(int) *(unsigned char *) txt]; } else { chr = Font_6x8[(int) *(unsigned char *) txt]; -- cgit v1.2.3