Graphic LCD Library for microcontrollers based embedded systems. Compatible with chipsets PCD854, ST7565R, NTD75451 and many AVR, LPC, PIC, STM32 devices.
thanks for this great library. I'm using it with a STM32 and a ST7565 based LCD. It works pretty well, but there is a problem when drawing a character in MIKRO format that have a height of an exact multiple of 8.
In text.c, line 118:
uint8_t bytes_high = font_current.height / 8 + 1;
If you have a font with height 16, the bytes_high will be 3, which is incorrect (should be 2). The drawing result is a mess, because the lib "thinks" that the char have 3 bytes in height.
Hello,
thanks for this great library. I'm using it with a STM32 and a ST7565 based LCD. It works pretty well, but there is a problem when drawing a character in MIKRO format that have a height of an exact multiple of 8.
In text.c, line 118:
uint8_t bytes_high = font_current.height / 8 + 1;
If you have a font with height 16, the bytes_high will be 3, which is incorrect (should be 2). The drawing result is a mess, because the lib "thinks" that the char have 3 bytes in height.
I change that line with:
Basically it just checks if the remainder is zero, if it is, it means that the height is a exact multiple of 8 and adding a 1 is not necessary.
With that modification I can use any font with 16, 24, 36, ... height pixels.
Thanks,
Miguel