markor icon indicating copy to clipboard operation
markor copied to clipboard

per-file-settings: text direction (RTL/LTR)

Open mr-islam opened this issue 4 years ago • 2 comments

Hi, I really love Markor and had one feature request:

Auto detection of RTL text and setting RTL direction. (At least in view mode.)

Right now, there's a setting that changes text direction globally for all documents. That's already helpful and better than so many apps that don't event consider RTL.

But the issue is when a user has documents in multiple languages, some RTL and some LTR. In this case, a global setting is unsuitable.

If possible, I would like to request auto detection of RTL text to set the direction of each document.

Another, possibly more difficult, option would be auto detection of text direction on the paragraph level. This would help when one file has multiple languages.

An easy way to do this is to check the text-direction unicode property of the first character in each paragraph and set the paragraph direction accordingly.

I'm not too familiar with Android app development, so sadly I don't think I can contribute to this directly with code...

mr-islam avatar Feb 06 '21 15:02 mr-islam

I read through some discussions and topics - everybody/everything I read does RTL/LTR based on Locale and/or system settings. Not based on any content.
Analyzing content comes at cost of performance and I don't see the need for it in this case.

What I rather think off is, moving/adding the RTL setting out from global settings to file settings menu so you can manually set it per-file as you wish.

gsantner avatar Feb 06 '21 15:02 gsantner

Yes of course, doing it on a per file basis is a popular approach that users are familiar with 👍.

I was suggesting automatic text direction based on Google Docs and Keep – they have my personal favorite implementation with auto direction based on the content of each paragraph.

But that has performance costs like you said, and is not very common.

mr-islam avatar Feb 06 '21 18:02 mr-islam