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.
2 parents 463fc68 + a392523 commit b536f4fCopy full SHA for b536f4f
adafruit_display_text/label.py
@@ -238,9 +238,12 @@ def text(self):
238
239
@text.setter
240
def text(self, new_text):
241
- current_anchored_position = self.anchored_position
242
- self._update_text(str(new_text))
243
- self.anchored_position = current_anchored_position
+ try:
+ current_anchored_position = self.anchored_position
+ self._update_text(str(new_text))
244
+ self.anchored_position = current_anchored_position
245
+ except RuntimeError:
246
+ raise RuntimeError("Text length exceeds max_glyphs")
247
248
@property
249
def font(self):
0 commit comments