Prevent from writing the whole font when a char is missing (i.e. special chars)
This commit is contained in:
@@ -296,7 +296,8 @@ uint8_t BitmapBuffer::drawCharWithoutCache(coord_t x, coord_t y, const uint8_t *
|
||||
{
|
||||
coord_t offset = spec[index];
|
||||
coord_t width = spec[index+1] - offset;
|
||||
if (width > 0) drawBitmapPattern(x, y, font, flags, offset, width);
|
||||
if (width > 0)
|
||||
drawBitmapPattern(x, y, font, flags, offset, width);
|
||||
return width;
|
||||
}
|
||||
|
||||
@@ -304,7 +305,8 @@ uint8_t BitmapBuffer::drawCharWithCache(coord_t x, coord_t y, const BitmapBuffer
|
||||
{
|
||||
coord_t offset = spec[index];
|
||||
coord_t width = spec[index+1] - offset;
|
||||
drawBitmap(x, y, font, offset, 0, width);
|
||||
if (width > 0)
|
||||
drawBitmap(x, y, font, offset, 0, width);
|
||||
return width;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user