Hi Egmont. For bug 1, yes, fontconfig can be used for this. We even have a special configuration file at /etc/fonts/conf.d/56-language-selector-ar.conf to use a different font when the system language is Arabic (Noto Sans Arabic). I believe it can be tweaked to use a custom Monospace font when system language is Arabic like this:
<alias> <family>monospace</family> <prefer> <family>DejaVu Sans Mono</family> </prefer> </alias> Adding this to the file made the Monospace font change to DejaVu Sans Mono in some places (e.g Gedit), but the GNOME Terminal was still using Ubuntu Mono for some reason. I don't know why at the moment. Perhaps I need to open a thread on Ubuntu Discourse. There are some i18n guys there last time I remember. I will do that and see how we can change the default font in the terminal for Arabic. About lam-alif ligature, if you meant using the letter "alif" + letter "lam" then they can be displayed in a good shape in the terminal. But if you meant this one combined letter which has both alif and lam already together then it is indeed broken in the terminal. However, not so many Arabic people use this letter, and as a workaround, it can be written as a normal lam + normal alif in order to be displayed like the first line in my new attached screenshot. I think it's not a big deal for now. For bug 2. Wow! Indeed as you said, it works well now and the text is displayed correctly just like in Gedit. I attached a screenshot. Is there a way where we can use this "printf '\e[?2501h'" workaround in the GNOME Terminal in Ubuntu, at least only when the Arabic language is set for the system by default? If the user is an Arabic-based user, then it makes sense to offer this advantage for him/her in the terminal I believe. For example, we can append this by default to ~/.bashrc: systemlanguage=${LANG:0:2} if [ $systemlanguage == "ar" ]; then printf '\e[?2501h'; fi If the system language is "ar", it will enable the auto-detection of paragraph direction in the VTE session. What do you think? I can suggest this in the Ubuntu Discourse too for the i18n guys. Thank you Egmont for your help! -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to gnome-terminal in Ubuntu. https://bugs.launchpad.net/bugs/2002290 Title: Poor Arabic rendering in VTE Status in gnome-terminal package in Ubuntu: New Status in vte package in Ubuntu: New Bug description: VTE has a number of issues when it comes to rendering Arabic letters in the terminal, which could affect a number of languages (Arabic, Urdu, Persian... etc). Bug 1: Any Arabic word in any VTE-based terminal is choppily displayed with spaces between its letters, making readability hard and sometimes not possible. Sometimes the letters are crushed together very closely making reading impossible too. Bug 2: If a non-Arabic text and an Arabic text are displayed together in the same line, then the entire line will be missed up and you won't be able to understand what is being said. Both of these bugs can be seen from the image I attached. I reported both of these bugs together because it's unlikely they can be fixed separately, probably they are related to each other. Problem can be seen in any VTE-based terminal. Here I am using GNOME Terminal 3.44.0 on Ubuntu 22.04, but it can be seen in any Ubuntu version and in any terminal version as well (it has been there since forever). I reported the bug here instead of upstream because that's what they said at the page: https://wiki.gnome.org/Apps/Terminal/ReportingBugs, but this bug is not related to Ubuntu only; it happens on all Linux distributions. Happy to provide any information you need, or any do tests or experiments. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gnome-terminal/+bug/2002290/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp