Skip to content

Commit

Permalink
Update Adafruit_GFX.cpp
Browse files Browse the repository at this point in the history
Bugfix
  • Loading branch information
nathanjshaffer committed Jan 6, 2024
1 parent ccdbcbf commit 7e841e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Adafruit_GFX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,7 @@ void Adafruit_GFX::drawChar(int16_t x, int16_t y, unsigned char c,
for (int8_t j = 0; j < 8; j++, line >>= 1) {
if (line & 1) {
rp++;
if (!(1 & (line >> 1))) { //write sequential pixels with writeFillRect
if (!(1 & (line >> 1)) || j == 7) { //write sequential pixels with writeFillRect
if(rp == 1 && size_x == 1 && size_y == 1) {
writePixel(x + i, y + j, color);
}
Expand All @@ -1166,7 +1166,7 @@ void Adafruit_GFX::drawChar(int16_t x, int16_t y, unsigned char c,
}
else if (bg != color) {
rb++;
if( 1 & (line >> 1)) { //write sequential pixels with writeFillRect
if( 1 & (line >> 1) || j == 7) { //write sequential pixels with writeFillRect
if (rb == 1 && size_x == 1 && size_y == 1) {
writePixel(x + i, y + j, bg);
}
Expand Down

0 comments on commit 7e841e9

Please sign in to comment.