@@ -271,14 +271,15 @@ def line(self, x_0, y_0, x_1, y_1, color): # pylint: disable=too-many-arguments
271
271
"""Draw a line from (x_0, y_0) to (x_1, y_1) in passed color"""
272
272
self ._color_dup ("line" , (x_0 , y_0 , x_1 , y_1 ), color )
273
273
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 ):
275
275
"""Write text string at location (x, y) in given color, using font file"""
276
276
if self ._blackframebuf is self ._colorframebuf : # monochrome
277
277
self ._blackframebuf .text (
278
278
string ,
279
279
x ,
280
280
y ,
281
281
font_name = font_name ,
282
+ size = size ,
282
283
color = (color != Adafruit_EPD .WHITE ) != self ._black_inverted ,
283
284
)
284
285
else :
@@ -287,13 +288,15 @@ def text(self, string, x, y, color, *, font_name="font5x8.bin"):
287
288
x ,
288
289
y ,
289
290
font_name = font_name ,
291
+ size = size ,
290
292
color = (color == Adafruit_EPD .BLACK ) != self ._black_inverted ,
291
293
)
292
294
self ._colorframebuf .text (
293
295
string ,
294
296
x ,
295
297
y ,
296
298
font_name = font_name ,
299
+ size = size ,
297
300
color = (color == Adafruit_EPD .RED ) != self ._color_inverted ,
298
301
)
299
302
0 commit comments