From 6e7337cca5bfc25919804face64998d16088148c Mon Sep 17 00:00:00 2001 From: jaseg Date: Sat, 22 Jul 2023 12:40:34 +0200 Subject: Rendering looks pretty good --- gerbonara/cad/kicad/base_types.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gerbonara') diff --git a/gerbonara/cad/kicad/base_types.py b/gerbonara/cad/kicad/base_types.py index 518200d..001138c 100644 --- a/gerbonara/cad/kicad/base_types.py +++ b/gerbonara/cad/kicad/base_types.py @@ -348,6 +348,7 @@ class TextMixin: h_align = self.h_align mx, my = self.mirrored if rot in (90, 270): + h_align = {'left': 'right', 'right': 'left'}.get(h_align, h_align) rot = (rot+180)%360 elif rot == 180: rot = 0 @@ -359,6 +360,12 @@ class TextMixin: if mx and rot in (90, 270): h_align = {'left': 'right', 'right': 'left'}.get(h_align, h_align) rot = (rot+180)%360 + if rot == 180: + rot = 0 + h_align = {'left': 'right', 'right': 'left'}.get(h_align, h_align) + if rot == 90: + rot = 270 + h_align = {'left': 'right', 'right': 'left'}.get(h_align, h_align) yield font.render_svg(text, size=self.size or 1.27, -- cgit