Sublime Forum

Support dir attribute in mini-HTML for show_popup

#1

I know we keep asking for more and more HTML support for show_popup, but I think this one has an interesting use case.
People have been asking for “right to left” text layout support in ST but I remember Jon said that it has been delayed till ST4.
It’s particularly annoying for Arabic and Persian since ligatures change their shape depending on their context. This is handled by BiDi algorithm that ST does not support at the moment and it hurts the readability of the text.
HTML supports this natively and therefore Persian and Arabic words look much better in HTML popup. In fact if you want to just show a single word it’s perfect.
The problem is that words in a sentence are laid out from left to right, but HTML has an attribute to change this dir="rtl" and dir="ltr"
Having this attribute will allow us to write a plugin to preview Arabic/Persian text in a popup to improve readability until ST supports BiDi.

0 Likes