Skip to content

Commit 1bf7658

Browse files
committed
2 parents 74d29df + 5284071 commit 1bf7658

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

adafruit_matrixportal/matrixportal.py

+4
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ def __init__(
127127
self._text_scale = []
128128
self._scrolling_index = None
129129
self._text_font = terminalio.FONT
130+
self._text_line_spacing = []
130131

131132
gc.collect()
132133

@@ -141,6 +142,7 @@ def add_text(
141142
text_transform=None,
142143
text_scale=1,
143144
scrolling=False,
145+
line_spacing=1.25,
144146
):
145147
"""
146148
Add text labels with settings
@@ -190,6 +192,7 @@ def add_text(
190192
self._text_transform.append(text_transform)
191193
self._text_scale.append(text_scale)
192194
self._text_scrolling.append(scrolling)
195+
self._text_line_spacing.append(line_spacing)
193196

194197
if scrolling and self._scrolling_index is None: # Not initialized yet
195198
self._scrolling_index = self._get_next_scrollable_text_index()
@@ -281,6 +284,7 @@ def set_text(self, val, index=0):
281284
self._text[index].color = self._text_color[index]
282285
self._text[index].x = self._text_position[index][0]
283286
self._text[index].y = self._text_position[index][1]
287+
self._text[index].line_spacing = self._text_line_spacing[index]
284288
elif index_in_splash is not None:
285289
self._text[index] = None
286290

0 commit comments

Comments
 (0)