wtf
This commit is contained in:
parent
54277a7208
commit
54e78333dd
|
@ -7,7 +7,7 @@ class FontManager:
|
|||
def set_font_size(self, size):
|
||||
self.font = ImageFont.truetype("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf", size)
|
||||
|
||||
def draw_multiline_text(self, draw, text, x, y, width, height):
|
||||
def draw_multiline_text(self, draw, text, x, y, width, height):
|
||||
lines = []
|
||||
words = text.split(" ")
|
||||
line = ""
|
||||
|
@ -25,8 +25,3 @@ def draw_multiline_text(self, draw, text, x, y, width, height):
|
|||
draw.rectangle((0, 0, width, height), outline=0, fill=0)
|
||||
for idx, line in enumerate(lines):
|
||||
draw.text((x, y + idx * self.font.size), line, font=self.font, fill=255)
|
||||
|
||||
|
||||
draw.rectangle((0, 0, width, height), outline=0, fill=0)
|
||||
for idx, line in enumerate(lines):
|
||||
draw.text((x, y + idx * self.font.size), line, font=self.font, fill=255)
|
||||
|
|
Loading…
Reference in a new issue