@brief Draws a single bitmap character
*/
/**************************************************************************/
-void drawCharBitmap(const uint16_t xPixel, const uint16_t yPixel, uint16_t color, const uint8_t *glyph, uint8_t cols, uint8_t rows)
+void drawCharBitmap(const uint16_t xPixel, const uint16_t yPixel, uint16_t color, const char *glyph, uint8_t cols, uint8_t rows)
{
- uint16_t verticalPage, horizBit, currentY, currentX;
- uint16_t indexIntoGlyph;
-
+ uint16_t currentY, currentX, indexIntoGlyph;
uint16_t _row, _col, _colPages;
// set initial current y
// Send individual characters
// We need to manually calculate width in pages since this is screwy with variable width fonts
//uint8_t heightPages = charWidth % 8 ? charWidth / 8 : charWidth / 8 + 1;
- drawCharBitmap(currentX, y, color, &fontInfo->data[charOffset], charWidth, fontInfo->height);
+ drawCharBitmap(currentX, y, color, (const char *)(&fontInfo->data[charOffset]), charWidth, fontInfo->height);
// next char X
currentX += charWidth + 1;
}
}
- /* return the wdith */
- return width;
+ /* return the width */
+ return width > 0 ? width - 1 : width;
}
/**************************************************************************/