I want to display some Hebrew text using Text and TextPath. In plain HTML5 it seems the best way is to set the dir
attribute on the canvas
to rtl
(HTML5 Canvas fillText with Right-to-Left string). How do I do that in Konva?
Asked
Active
Viewed 834 times
1 Answers
2
const canvas = layer.getCanvas()._canvas;
canvas.setAttribute('dir', 'rtl');

lavrton
- 18,973
- 4
- 30
- 63
-
Thanks! It works for Text but not for TextPath. Guess I'm missing something – daonb Mar 19 '18 at 10:04
-
1Yeah. TextPath is drawing each symbol manually. So you have to do adjustment by yourself. – lavrton Mar 20 '18 at 02:55