Adafruit GFX Library line wrap

Is there any way to make the Line Wrap, break at spaces instead of in the middle of a word?
I'm using the Adafruit GFX Library.

No, but in Adafruit_GFX.h lines 114ff:

  void getTextBounds(const char *string, int16_t x, int16_t y, int16_t *x1,
                     int16_t *y1, uint16_t *w, uint16_t *h);
  void getTextBounds(const __FlashStringHelper *s, int16_t x, int16_t y,
                     int16_t *x1, int16_t *y1, uint16_t *w, uint16_t *h);
  void getTextBounds(const String &str, int16_t x, int16_t y, int16_t *x1,
                     int16_t *y1, uint16_t *w, uint16_t *h);

call getTextBounds for each word to check if it (still) fits.
-jz-

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.