Adafruit-GFX-Library
Adafruit-GFX-Library copied to clipboard
getTextBounds not working in unicode
So I am using thre standard Arduino library as well as gfx to display text in an e ink display, I have used a custom arial font and cannot figure out how to align a text to the right so the start of the text is all on the same exact horizontal line, since I am using an RTL language it will look better that way
i tried to use getTextBounds but it doesn't appear to correctly calculate the width
uint16_t w, h;
display.getTextBounds(string, 0, 0, &x1, &y1, &w, &h);
uint16_t fullx = x - w;
display.setCursor(fullx, 10);
It does work when using a string that only contains English but not unicode language (Hebrew)
Any idea what am I doing wrong? Or is it a problem with char byte calculation?