-
Notifications
You must be signed in to change notification settings - Fork 689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
minimal RTL support for single lines #1442
Comments
I'll say up front I'm not very familiar with RTL languages on computers. I have read the full RTL/Bidi terminal spec here and I don't currently plan on supporting that in the near term since it requires a very significant amount of effort that I'm not ready to put forward. One day, I'd like to support this. If what you're suggesting can be resolved in a renderer/shaping-only way then I think we can at least get partial RTL support, so I'll keep this open for that. 😄 More research necessary. Thank you for the example text and screenshots, this will help significantly. |
Until the RTL Support added in the future I encourage you to use bicon with ghostty, or use wezterm "it supports RTL very will |
Could I suggest a slight tweak to the wording of the features page related to this? That page currently says:
which is a little like saying "English text renders correctly (backwards only)." I think it would be clearer to say something like:
|
@mjec Happy to make that change, would you be open to PR-ing it to the website repo? |
Ghostty does not render characters in RTL scripts correctly, though. They are rendered backwards. Would you say |
I would say that each grapheme is correctly clustered and rendered, even though the text direction is wrong. My understanding is individual grapheme clusters in RTL scripts are correctly rendered, though RTL text direction isn't. If that's incorrect, let me know; I'm certainly not an expert. But if that's correct and you think the proposed text doesn't accurately capture that idea, I'd be very open to suggested changes. (Ideally this conversation should probably happen on the website repo, but I'm yet to open the promised PR.) |
?hsilgnE troppus yttsohG soeD |
As discussed in ghostty-org/ghostty#1442 (comment), this clarifies that RTL text is not supported, although rendering of individual grapheme clusters from RTL scripts is done correctly.
Maybe libraqm's minimal implementation can be helpful on how to integrate a bidi library with shaper https://github.com/HOST-Oman/libraqm macOS side, ghostty vs macOS terminal vs iterm2, the second one is correct, the text is "ابراهیم" ![]() |
version=0.1.0-main+4ac9610b
right now this is how
بسم الله الرحمن الرحيم
will look in ghostty


and like this in konsole
there are multiple issues
first the characters shaping is wrong
in Arabic and Persian each glyph changes shape depending on the glyph behind it and after it for example:
ignore the "e)" it is there just to make the Arabic text left aligned
e) ي + ز + ن
the first letter is "ي" and the last is "ن"
should be shaped like this
e) يـ + ـز + ن
not like this
e) ( ي + ز + ن ) or (ي + ز + ـن)
the second issue is glyph order in each word
e)
علي
(correct)even if the first issue was fixed the text will look like this
e)
ﻲﻠﻋ
(wrong)the third issue is word ordering, I don't think there is one correct answer there are two options
the first is to not change anything
firstWord secondWord
or make it like konsole
secondWord firstWord
The text was updated successfully, but these errors were encountered: