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
Setting the dir option is for the whole canvas - for individual strings that behave badly, you might consider manually adding an RTL marker (U+200F) after the quote.