migcontrol / django-migcontrol

A Wagtail-based Django website for Migration Control
GNU General Public License v3.0
0 stars 5 forks source link

Mixture of left- and right-aligned text does not work well #254

Open teabag12 opened 8 months ago

teabag12 commented 8 months ago

Articles mixing left-aligned fonts (Latin alphabet) with right-aligned fonts (Arabic) display the right-aligned text inaccurately. E.g in the screenshot (taken from: https://migration-control.info/en/blog/monthly-press-review-december-2023/), the Arabic is left-aligned and the punctuation is on the right end of the text row, though it should be right-aligned and the punctuation should be on the left end.

image

teabag12 commented 8 months ago

maybe it makes sense to add a function for editors to select and mark text as right-aligned when creating the article?

benjaoming commented 8 months ago

Marking it as right-aligned won't change the text flow direction :(

I'm not sure if there is a good way to fix this.

I think that on a very basic level, we cannot mix LTR and RTL in the same block of text. We have to use two different paragraphs.

As I understand it, the editor might be capable of detecting flow direction by itself.

image

teabag12 commented 8 months ago

I see, too bad. Anyway, I'll give that back to the others and see if they can deal with it :)

benjaoming commented 8 months ago

You can try to add two different paragraph blocks, so that Arabic is in its own block exclusively. That way, it might get detected correctly.