HTML5 Canvas fillText with Right-to-Left string

前端 未结 4 1106
抹茶落季
抹茶落季 2021-01-05 01:48

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

4条回答
  •  臣服心动
    2021-01-05 02:15

    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.

提交回复
热议问题