Minder icon indicating copy to clipboard operation
Minder copied to clipboard

Add support for ZWNJ character in title

Open ahangarha opened this issue 3 years ago • 6 comments

In Farsi (Persian) and maybe some other languages, we use ZWNJ character to add a non-joining space between some letters. Currently Minder doesn't let this character to be added to the title.

As a reference you can try نرم‌افزار which currently look like نرمافزار

ahangarha avatar Jul 27 '22 21:07 ahangarha

I'm not sure what would be required to fix this issue as font production is supposed to be handled by Pango and the input method context handler (both of which are standard libraries that are outside of Minder's code base).

phase1geo avatar Jul 28 '22 11:07 phase1geo

I am not familiar with this project's stack. I tried to check the code but didn't find anything about text manipulation. So you mean there is not mechanism to sanitize the text within the code base; there is no text manipulation. Right?

ahangarha avatar Jul 28 '22 11:07 ahangarha

I see something interesting. I can type ZWNJ in detail window. Also I can copy paste a text with ZWNJ to the title but I cannot type it there.

So I guess there should be some kind of filtering/sanitization in the case of title.

ahangarha avatar Jul 31 '22 13:07 ahangarha

The note field is a standard Gtk.TextBuffer which has its own text bindings. The title fields in the mind-map are a more custom implementation with its own bindings, but under the hood should use the same input method and font rendering libraries as a Gtk.TextBuffer. So there is a difference but I would not expect any differences in capabilities (at least in terms of entering characters regardless of language).

So, out of curiosity, how would I reproduce this issue on my end? I'm not terribly familiar with characters used outside of those in most western countries.

phase1geo avatar Aug 02 '22 02:08 phase1geo

For context, my laptop is a QWERTY keyboard (so maybe it is not possible to reproduce?)

phase1geo avatar Aug 02 '22 03:08 phase1geo

You can add Persian (Farsi) keyboard to your system and use standard keyboard (there might be multiple options. To verify if you have installed right keyboard, set the layout to Persian and press m button. You should see پ.

If so, just press these keys while using Persian keyboard: 'kvl' (نرم) and then Shift+space (for ZWNJ) and then 'htchv'. You should see نرم‌افزار not نرمافزار.

ahangarha avatar Aug 02 '22 09:08 ahangarha

Okay, I believe that I now have this issue fixed in the master branch. It should be available in the 1.15.3 release. If you would like to try it before then (to make sure I didn't miss anything), feel free to grab the master branch and give it a go.

phase1geo avatar May 28 '23 04:05 phase1geo

I couldn't run the project from the code in the repo.

ahangarha avatar Jun 23 '23 09:06 ahangarha

Is this issue resolved in any of the recent releases? I don't see relevant entries in the release notes.

ahangarha avatar Aug 23 '23 18:08 ahangarha

Yes. Version 1.15.5 will be the release version you want.

phase1geo avatar Aug 23 '23 18:08 phase1geo

I just tested and it works perfectly.

Thanks for fixing this issue.

ahangarha avatar Aug 23 '23 18:08 ahangarha