diff options
author | Reinhard Tartler <siretart@tauware.de> | 2011-08-26 09:26:25 +0200 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2011-08-26 09:26:25 +0200 |
commit | 37bc217dceb95a538be6d297c1deae821bfe0fb7 (patch) | |
tree | 6bbc6d4be5b91291218c2095147fc36788977585 /drv_generic_graphic.c | |
parent | 7544d6152d8fb4e3804806eb0202222540f2c99c (diff) | |
parent | 7c0fb2e980af93923f2071e1af087010962e06bd (diff) | |
download | lcd4linux-37bc217dceb95a538be6d297c1deae821bfe0fb7.tar.gz |
New upstream version
Diffstat (limited to 'drv_generic_graphic.c')
-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]; |