From 713692a8896d0db0206b0ec0e22f64f8d043fa13 Mon Sep 17 00:00:00 2001 From: Margaret Matocha Date: Fri, 29 May 2020 11:18:26 -0500 Subject: [PATCH] Updated bounding box to include trailing whitespace --- adafruit_display_text/label.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_display_text/label.py b/adafruit_display_text/label.py index 64730b6..ca634fe 100755 --- a/adafruit_display_text/label.py +++ b/adafruit_display_text/label.py @@ -126,7 +126,7 @@ def _update_text(self, new_text): # pylint: disable=too-many-locals glyph = self._font.get_glyph(ord(character)) if not glyph: continue - right = max(right, x + glyph.width) + right = max(right, x + glyph.width + glyph.shift_x) if y == 0: # first line, find the Ascender height top = min(top, -glyph.height + y_offset) bottom = max(bottom, y - glyph.dy + y_offset)