diff options
Diffstat (limited to '')
-rw-r--r-- | drv_generic_graphic.c | 12 |
1 files changed, 10 insertions, 2 deletions
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]; |