From d6495fc7b4812872fc757282b6a96a3de2bee713 Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Mon, 23 Sep 2019 12:15:49 +0200 Subject: [PATCH] DrillBox: Fix font size Now that the text() function has a fontsize parameter, setting the font size on ctx before calling text() has no impact. Resolves: #173 Thanks to Marko Luther for reporting and suggesting this fix! --- boxes/generators/drillbox.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/boxes/generators/drillbox.py b/boxes/generators/drillbox.py index a3ccd6d..ac2b3b2 100644 --- a/boxes/generators/drillbox.py +++ b/boxes/generators/drillbox.py @@ -42,13 +42,12 @@ in 0.5mm steps, 3 holes each size""" self.hole(i * 20 + 10, j * 60 + k * 20 + 10, r + 0.05) def descriptionText(self): - self.ctx.set_font_size(6) for i in range(4): for j in range(6): self.rectangularHole(i * 60 + 30, 20 * j + 10, 58, 14 + 1 * j) d = 2.5 - 0.5 * i + 2 * j self.text("%.1f" % d, i * 60 + 20, 19 * j + 6, - align="center") + align="center", fontsize=6) def render(self): x, y, h = self.x, self.y, self.h