Skip to content

Commit 3e1546d

Browse files
authored
Merge pull request #50 from lyusupov/master
fix candidate for an issue of that a font size argument is not passed to the framebuf layer
2 parents e55b9be + f0d6f5f commit 3e1546d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

adafruit_epd/epd.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -271,14 +271,15 @@ def line(self, x_0, y_0, x_1, y_1, color): # pylint: disable=too-many-arguments
271271
"""Draw a line from (x_0, y_0) to (x_1, y_1) in passed color"""
272272
self._color_dup("line", (x_0, y_0, x_1, y_1), color)
273273

274-
def text(self, string, x, y, color, *, font_name="font5x8.bin"):
274+
def text(self, string, x, y, color, *, font_name="font5x8.bin", size=1):
275275
"""Write text string at location (x, y) in given color, using font file"""
276276
if self._blackframebuf is self._colorframebuf: # monochrome
277277
self._blackframebuf.text(
278278
string,
279279
x,
280280
y,
281281
font_name=font_name,
282+
size=size,
282283
color=(color != Adafruit_EPD.WHITE) != self._black_inverted,
283284
)
284285
else:
@@ -287,13 +288,15 @@ def text(self, string, x, y, color, *, font_name="font5x8.bin"):
287288
x,
288289
y,
289290
font_name=font_name,
291+
size=size,
290292
color=(color == Adafruit_EPD.BLACK) != self._black_inverted,
291293
)
292294
self._colorframebuf.text(
293295
string,
294296
x,
295297
y,
296298
font_name=font_name,
299+
size=size,
297300
color=(color == Adafruit_EPD.RED) != self._color_inverted,
298301
)
299302

0 commit comments

Comments
 (0)