diff --git a/rasterizer.py b/rasterizer.py index 84f7c83..6073470 100644 --- a/rasterizer.py +++ b/rasterizer.py @@ -3,7 +3,7 @@ import numpy as np def text_to_matrix(text, size, font): pil_font = ImageFont.truetype(font, size=size // len(text), encoding="unic") - canvas = Image.new('RGB', [size + 20, size + 20], (255, 255, 255)) + canvas = Image.new('RGB', [size * 2, size * 2], (255, 255, 255)) draw = ImageDraw.Draw(canvas) black = "#000000" draw.text((10, 10), text, font=pil_font, fill=black)