From 8e964d9e6951e7251e37e4071308cf4354c4bd54 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Sat, 25 Apr 2020 20:57:28 +0200 Subject: render: Fix mirroring of brackets Apparently direction must be specified on parent element to have an effect. This way brackets will be mirrored correctly when rendering. --- lulua/render.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lulua/render.py b/lulua/render.py index 7ffae5a..e195c99 100644 --- a/lulua/render.py +++ b/lulua/render.py @@ -231,6 +231,7 @@ class Renderer: t = svgwrite.text.Text ('', insert=((xoff+width/2+txoff), (yoff+settings.buttonWidth/2+tyoff)), text_anchor='middle', + direction='rtl', class_=' '.join (class_)) if text.startswith ('[') and text.endswith (']'): # XXX: should find us a font which has glyphs for control chars @@ -244,7 +245,7 @@ class Renderer: stroke_dasharray='15,8', class_=' '.join (controlclass_))) else: - t.add (svgwrite.text.TSpan (text, class_=style, direction='rtl')) + t.add (svgwrite.text.TSpan (text, class_=style)) g.add (t) return g -- cgit v1.2.3