termux-app
termux-app copied to clipboard
[Feature]: add support for right-to-left languages
Feature description
This works on any input field and in the slide on extra keys too. But not in the actual terminal . the charecters gets individually displayed instead of merged into a word. Don't know if it is possible bcs its a terminal not an usual text input field.
Example :
Additional information
This would help a lot . cant text edit or write this kinda languages in termux terminal.also left to right, right to left directions.
A possible font problem?
I can display non-english characters but, I think that you are confusing this with Unicode Combining Characters not displaying correctly?
please post which font your using and type the actual text here and not only a screen-shot
@ChiefMikeK androids default fonts. And yeah maybe you are right Unicode combining characters. BTW I showed an example . the same text is written in the terminal and right above the keyboard . here صباح الخير
and I can show you other languages if you need.
الخير
صباح
These 2words do not have any combining characters possibly? related to harfbuzz as i've tred diff fonts.
@ChiefMikeK when they are written without space the characters gets combined into الخير
but individually they are ا ل خ ي ر
.btw this language writes right to left . but in terminal they gets as English left to right.
Termux doesn't really support right-to-left languages. More issues related to this one:
- https://github.com/termux/termux-app/issues/1256
- https://github.com/termux/termux-app/issues/296
The true thing will shown:
"سلام سلام خداحافظ خداحافظ گوگولی مگولی :)"
(Still the smily face is in wrong direction cuz of html roles. But you can see the best result in this picture:
Should fix with this method: https://bugzilla.xfce.org/show_bug.cgi?id=12576
If anyone wants to test bidi support, you can try my branch: https://github.com/MatanZ/termux-app/tree/bidi1
If anyone wants to test bidi support, you can try my branch: https://github.com/MatanZ/termux-app/tree/bidi1
Thanks It's fucking good news.🎉 But We have no compilers Just merge it to mainstream branch and wait to see your updates on f-droid It's not a simple update if you fixed working with RTL languages It will be merged.
If anyone wants to test bidi support, you can try my branch: MatanZ/termux-app@
bidi1
@MatanZ i tested it, it works, but it made the app so slow and the font is a bit off
@ELWAER-M I can't build right now. Can you share the apk?
https://github.com/ELWAER-M/termux-app/actions/runs/3183478955
Wow amazing 😍 we need it in iran too for persian typing
But why first character bigger than others??🤦🏻😑
Also why my termux have not colorfull like that? Please make termux more stylish too.
@ELWAER-M before you say slow keep in mind that they are all debug builds. Build a release version and then try it.
@ELWAER-M before you say slow keep in mind that they are all debug builds. Build a release version and then try it.
they are the same thing lol
If anyone wants to test bidi support, you can try my branch: MatanZ/termux-app@
bidi1
@MatanZ i tested it, it works, but it made the app so slow and the font is a bit off
Is the Arabic font you use monospace? If it is not, then termux stretches thin letters, which may explain the weirdness. It is possible to avoid stretching, but then the letters will not connect. The best is to use a monospace font. Please note that even if you use a monospace font, the Arabic letters might come from a different font, and thus not be monospace.
About the slowness - I did not notice this, and my phone is quite slow (MT6753). I also do not see much reason for it since:
- The shaping/reordering code is not very slow, and it only needs to run 60 times a second.
- It runs only on lines that include Arabic/Hebrew letters, so for most lines there is no change.
Possibly the commit https://github.com/MatanZ/termux-app/commit/51c4ac262b81b1a92e0534bdfe5881764a8a9e1a is the problem, so you can try to revert it and rebuild.
Possibly the commit MatanZ@51c4ac2 is the problem, so you can try to revert it and rebuild.
yes after disabling the logging the issue solved!
Is the Arabic font you use monospace? If it is not, then termux stretches thin letters, which may explain the weirdness. It is possible to avoid stretching, but then the letters will not connect. The best is to use a monospace font. Please note that even if you use a monospace font, the Arabic letters might come from a different font, and thus not be monospace.
even with a monospaced arabic font (https://makkuk.com/kawkab-mono/) it still the same "the first letter is big"
I do not read Arabic well enough. Please include the same text in text format, so I may work on this. Also a correct rendering in the same font (from a browser, or something like that. If you have the patience to mark the meaningful mis-rendering, it will be even better.
some samples: السلام عليكم صباح الخير شمس قمر سماء أرض ماء نار هواء شروق غروب a monospaced arabic font
If you have the patience to mark the meaningful mis-rendering, it will be even better.
most the render problems is oh the letter ا
and when ر
and و
are together رو
This is not our problem (not nessesery to solve too) (also not bidi problem) we have problem on orginal termux. And will work on it. Also when the word is not selected it deferent with when its selected(I name it: end character shooting problem 🎉ECSP🎉 ):
The font thickness issues may be somehow related to #2539
The font thickness issues may be somehow related to #2539
maybe it is? i tested it on a samsung phone
I tried a few fonts from termux styles and GNU FreeFont was the only one found that displayed correctly from right margin and also did not embolden the ARABIC ALEF U+0627
Please What should I do to get installed bidi? It is not clear what is required in #2953