From f0d6f5f9cb912904e9ff502a54e5e6ad3705f134 Mon Sep 17 00:00:00 2001 From: Linar Yusupov Date: Mon, 29 Mar 2021 10:16:14 +0300 Subject: [PATCH] fix candidate for an issue that font size argument is not passed to the framebuf layer --- adafruit_epd/epd.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/adafruit_epd/epd.py b/adafruit_epd/epd.py index e1061f8..91537ff 100644 --- a/adafruit_epd/epd.py +++ b/adafruit_epd/epd.py @@ -271,7 +271,7 @@ def line(self, x_0, y_0, x_1, y_1, color): # pylint: disable=too-many-arguments """Draw a line from (x_0, y_0) to (x_1, y_1) in passed color""" self._color_dup("line", (x_0, y_0, x_1, y_1), color) - def text(self, string, x, y, color, *, font_name="font5x8.bin"): + def text(self, string, x, y, color, *, font_name="font5x8.bin", size=1): """Write text string at location (x, y) in given color, using font file""" if self._blackframebuf is self._colorframebuf: # monochrome self._blackframebuf.text( @@ -279,6 +279,7 @@ def text(self, string, x, y, color, *, font_name="font5x8.bin"): x, y, font_name=font_name, + size=size, color=(color != Adafruit_EPD.WHITE) != self._black_inverted, ) else: @@ -287,6 +288,7 @@ def text(self, string, x, y, color, *, font_name="font5x8.bin"): x, y, font_name=font_name, + size=size, color=(color == Adafruit_EPD.BLACK) != self._black_inverted, ) self._colorframebuf.text( @@ -294,6 +296,7 @@ def text(self, string, x, y, color, *, font_name="font5x8.bin"): x, y, font_name=font_name, + size=size, color=(color == Adafruit_EPD.RED) != self._color_inverted, )