# HG changeset patch # User Ideenmodellierer # Date 1610742029 -3600 # Node ID 82d58470fd949a8f73714f86a5faf1cb9c20a917 # Parent 916998f90e390667c50c49a9f02f1e2a9f8b092f Bugfix inverted whitspace: In the print substring function white spaces are bypassed by just increasing the drawing position without really putting a pixel on the screen. As results white space were not draw as yellow boxes resulting in a bad inverted string visualization. => Changed implementation to not bypass inverted white spaces. diff -r 916998f90e39 -r 82d58470fd94 Discovery/Src/gfx_engine.c --- a/Discovery/Src/gfx_engine.c Thu Jan 14 21:25:15 2021 +0100 +++ b/Discovery/Src/gfx_engine.c Fri Jan 15 21:20:29 2021 +0100 @@ -2239,8 +2239,10 @@ if(*(char*)pText == '\t') cfg->Xdelta = hgfx->WindowTab - hgfx->WindowX0; else - if(*(char*)pText == ' ') + if((*(char*)pText == ' ') && (cfg->invert == 0)) /* bypass drawing of white space only for not inverted mode */ + { cfg->Xdelta += ((tFont *)cfg->actualFont)->spacesize; + } else if((*(char*)pText) & 0x80) /* Identify a UNICODE character other than standard ASCII using the highest bit */ { @@ -2452,10 +2454,10 @@ else { pSource++; - for (j = height; j > 0; j--) + for (j = heightFont; j > 0; j--) { *(__IO uint16_t*)pDestination = 0xFF << 8 | cfg->color; - *(__IO uint16_t*)(pDestination + nextLine) = cfg->color << 8 |0xFF; + *(__IO uint16_t*)(pDestination + nextLine) = 0xFF << 8 | cfg->color; pDestination += stepdir; *(__IO uint16_t*)pDestination = 0xFF << 8 | cfg->color; *(__IO uint16_t*)(pDestination + nextLine) = 0xFF << 8 | cfg->color; @@ -2463,7 +2465,7 @@ *(__IO uint16_t*)pDestination = 0xFF << 8 | cfg->color; *(__IO uint16_t*)(pDestination + nextLine) = 0xFF << 8 | cfg->color; pDestination += stepdir; - *(__IO uint16_t*)pDestination = cfg->color << 8 |0xFF; + *(__IO uint16_t*)pDestination = 0xFF << 8 | cfg->color; *(__IO uint16_t*)(pDestination + nextLine) = 0xFF << 8 | cfg->color; pDestination += stepdir; *(__IO uint16_t*)pDestination = 0xFF << 8 | cfg->color;