summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2020-04-25 20:57:28 +0200
committerLars-Dominik Braun <lars@6xq.net>2020-04-25 20:57:28 +0200
commit8e964d9e6951e7251e37e4071308cf4354c4bd54 (patch)
tree2ec07e7176d676bcee1554016f6c5b82e4fcf7eb
parent6fcdcd76ef8d01eabe5aceed6ecf3b197ace9a9f (diff)
downloadlulua-8e964d9e6951e7251e37e4071308cf4354c4bd54.tar.gz
lulua-8e964d9e6951e7251e37e4071308cf4354c4bd54.tar.bz2
lulua-8e964d9e6951e7251e37e4071308cf4354c4bd54.zip
render: Fix mirroring of brackets
Apparently direction must be specified on parent <text> element to have an effect. This way brackets will be mirrored correctly when rendering.
-rw-r--r--lulua/render.py3
1 files changed, 2 insertions, 1 deletions
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