I am trying to use the fillText() method on an HTML5 Canvas\' 2d Context to draw a string written in Arabic. It works perfectly, until I put a punctuation mark at the end of
You don't need to set the direction for each individual string. See the following example which also shows the proper use of implicit bidi control marks for proper display order: