We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11c7b2f commit 9e2f2a7Copy full SHA for 9e2f2a7
adafruit_display_text/bitmap_label.py
@@ -401,7 +401,8 @@ def _text_bounding_box(
401
newlines = 0
402
line_spacing = self._line_spacing
403
404
- for char in text:
+ for char_index in range(len(text)):
405
+ char = text[char_index]
406
if char == "\n": # newline
407
newlines += 1
408
@@ -426,6 +427,11 @@ def _text_bounding_box(
426
427
xright = xposition + my_glyph.width + my_glyph.dx
428
xposition += my_glyph.shift_x
429
430
+ for accent in self.accent_ranges:
431
+ if accent[ACCENT_TYPE] == "outline":
432
+ if accent[ACCENT_START] <= char_index < accent[ACCENT_END]:
433
+ xposition += self.outline_size
434
+
435
right = max(right, xposition, xright)
436
437
if yposition == y_start: # first line, find the Ascender height
0 commit comments