Adafruit-GFX-Library icon indicating copy to clipboard operation
Adafruit-GFX-Library copied to clipboard

getTextBounds returning an incorrect width

Open mrcodetastic opened this issue 4 years ago • 1 comments
trafficstars

Refer to: https://github.com/mrfaptastic/ESP32-HUB75-MatrixPanel-I2S-DMA/issues/43

Specifically, https://github.com/mrfaptastic/ESP32-HUB75-MatrixPanel-I2S-DMA/issues/43#issuecomment-740575875

mrcodetastic avatar Dec 08 '20 11:12 mrcodetastic

I can confirm the issue. With the default font and default size the text bounds are always returned with an additional pixel in width and height which can also be seen in this image (the text "Huhu" is rasterized using AdafruitGFX and the preferred size is exactly what getTextBounds returns):

image

Naios avatar Jan 18 '21 15:01 Naios