-
Notifications
You must be signed in to change notification settings - Fork 26
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
Letter shaping not working almost on every terminal emulator #14
Comments
LinArcX <[email protected]> wrote:
Hi. and thank you so much for this great repository.
I compiled neatvi with default settings. But i realized that farsi characters shaping only works in st terminal emulator.
I've tested with tilda, tilix, xfce4-terminal. But shaping characters failed in all of them.
First, please check if the font used by these terminals has Farsi
glyphs (DejaVuSansMono would be fine, for instance). Also, some
terminals reorder and shape right-to-left text automatically. If so,
please disable that in the terminal (that is a bad idea anyway). If
you can't find the option, in Neatvi you can use the following command
to disable letter shaping:
:set noshape
and if that did not fix it, disable reordering characters:
:set noorder
Please report the outcome.
Ali
|
I've changed font to DejaVuSansMono and also set those options. Tested again, But still get same results. Actually I don't have any idea about: Those emulators uses vte. Is this the root of problems? |
LinArcX <[email protected]> wrote:
I've changed to DejaVuSansMono and also set those options. Tested
again, But still get same results. Actually I don't have any idea
about __disabling reorder and shape right-to-left text in emulators
that automatically do it as default behavior__.
Thanks for testing. Please send a screenshot.
Ali
|
Hi, In xfce4-terminal however, the letters are completely unreadable. This is strange since it's usually the opposite in other CLI programs. I'll provide a screenshot as reference. If anyone is interested, here is a gist of my The only issue here is that non-breaking spaces As a visual reference, this is the correct look of a word that includes non-breaking space (نیم فاصله): |
Hi,
wolandark ***@***.***> wrote:
Just commenting to say thanks for the great work and that Persian
looks fine in NeatVi using Xterm and SourceCodePro Nerd font (also
works with unpatched SourceCodePro font).
Good to hear that.
In xfce4-terminal however, the letters are completely unreadable.
This is strange since it's usually the opposite in other CLI programs.
I'll provide a screenshot as reference.
![neatvi](https://github.com/aligrudi/neatvi/assets/107309764/bc46f06f-66b5-469c-8bdc-d51d0a02a1fb)
xterm on the left and xfce4-terminal on the right.
Please try defining LNPREF as noted in conf.h ("\33[8l"); this
is necessary for vte-based terminals; this paragraph is from
the README:
Sadly, VTE-based terminals such as GNOME's implement a
backward-incompatible extension of virtual terminal escape codes to
render bidirectional text by default. When using these terminal, the
value of LNPREF macro in conf.h needs to be edited.
If anyone is interested, [here](https://gist.github.com/wolandark/2dc4199ad3cbcd9a111d6767c1ffcb55) is a gist of my `~/.Xresources`.
The only issue here is that non-breaking spaces `U+00A0` are rendered as `-`.
That is intentional but can be changed: see the placeholders[] array in
conf.h. For non-printable characters, you can define placeholders here.
The first entry is for ZWNJ.
As a visual reference, this is the correct look of a word that includes non-breaking space (نیم فاصله):
میتواند
The current form in NeatVi:
می-تواند
Let me know if I can run more test for you.
Please report if there are any problems.
Ali
|
Thank you. I should've paid more attention to the README. |
wolandark ***@***.***> wrote:
Thank you. I should've paid more attention to the README.
Everything worked fine according to your instructions.
Changing `{"<200c>", "-", 1},` to `{"", NULL, 1},` allows for correct rendition of the zero-width non-joiner characters.
This does not seem correct. I suggest something like this (the first entry
specifies the character and the second its replacement):
{"", "", 0},
Ali
|
@LinArcX / @wolandark, should we consider this issue as tackled? If so, do you think you can close it? Thank you a lot. |
@lobre Yes I believe we can close this issue. |
Hopefully @LinArcX can do this, otherwise nobody can 😅 |
Hi. and thank you so much for this great repository.
I compiled neatvi with default settings. But i realized that farsi characters shaping only works in st terminal emulator:
I've tested with tilda, tilix, xfce4-terminal. But shaping characters failed in all of them.
The text was updated successfully, but these errors were encountered: