diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2020-04-25 20:57:28 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2020-04-25 20:57:28 +0200 |
commit | 8e964d9e6951e7251e37e4071308cf4354c4bd54 (patch) | |
tree | 2ec07e7176d676bcee1554016f6c5b82e4fcf7eb | |
parent | 6fcdcd76ef8d01eabe5aceed6ecf3b197ace9a9f (diff) | |
download | lulua-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.py | 3 |
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 |