texstudio
texstudio copied to clipboard
Incorrect horizontal spacing of Devanagari font text
Environment
- TeXstudio: 4.6.2
- Qt: 5.15.3, compiled with Qt 5.15.3 R
- OS: Linux Mint, Cinnamon. Latest release, "System: Kernel: 6.2.0-26-generic x86_64 bits: 64 compiler: N/A Desktop: Cinnamon 5.8.4 tk: GTK 3.24.33 wm: muffin dm: LightDM Distro: Linux Mint 21.2 Victoria base: Ubuntu 22.04 jammy"
- TeX distribution: TeXlive, with daily refreshes using tlmgr.
Expected behavior
Devanagari is the writing system used for Hindi, Marathi, Sanskrit and some other Indian languages. It is a left-to-right script, similar to Roman script. The main distinction is that there are many, many ligatures (like ff fi fl in Roman scripts) that compress the script horizontally.
When I type I expect to see this:
अस्त्य्त्तर्स्यां दिशि देवतात्मा
graphic from my screen:
and to be able to type on the same line, insert and delete text, etc. as normal.
Actual behavior
The horizontal positioning of the cursor is wrong as one types or as one tries to edit a line with Devanagari text in it. This makes editing more or less impossible.
I attach a video example.
https://github.com/texstudio-org/texstudio/assets/762246/49f0caf2-9273-448c-af2b-8d3266950190
How to reproduce
Any typing in Devanagari script.
I use many other editors for textual work, from vim to LibreOffice and others, and TeXstudio is the only one that exhibits this behaviour. (Wait, there is one other: oXygenxml in text mode.)
Maybe you can play with "Configure TeXstudio -> Adv. Editor -> Hacks/Workarounds" settings, see for example https://github.com/texstudio-org/texstudio/issues/1099#issuecomment-632485580.
Thank you @muzimuzhi , this is a good idea. Setting
definitely improves things, especially the qt setting. But it's still not correct. In some cases, the cursor still skips unnecessarily or doesn't move when it should.