Skip to content
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

Usage of bidi characters caused mangled display #2774

Open
mintty opened this issue Jul 13, 2023 · 5 comments
Open

Usage of bidi characters caused mangled display #2774

mintty opened this issue Jul 13, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@mintty
Copy link

mintty commented Jul 13, 2023

According to mintty/wsltty#336, lazygit seems to use some Hebrew characters (like שׂ ,שּׁ) for layout or as markers.
Since right-to-left script characters cause display to be reordered in a proper bidi way on terminals that support it,
this totally spoils any pane formatting. Please do not use bidi.

@mintty mintty added the bug Something isn't working label Jul 13, 2023
@stefanhaller
Copy link
Collaborator

If I understand this right, then this is a problem with Nerd Fonts version 2 that is fixed with version 3. (See ryanoasis/nerd-fonts#478.)

Lazygit now supports version 3 (only on master, not in the latest release, sorry), so if you could try if this fixes the issue, this would be appreciated.

@mintty
Copy link
Author

mintty commented Jul 13, 2023

No, it's not a font issue. The bidi behaviour is triggered by any right-to-left character, regardless of its glyph.

@mintty
Copy link
Author

mintty commented Jul 13, 2023

Or does the change mean that RTL characters are not used anymore?

@stefanhaller
Copy link
Collaborator

Yes, I know. NerdFonts is a system where existing fonts are extended with many icons. The issue was that NerdFonts v2 chose a range of code points for some of these icons that overlapped with some existing hebrew ranges. In v3 those code points were moved to an used range.

@theherk
Copy link

theherk commented Oct 2, 2023

For anybody that wanders into this issue after unexpectedly seeing these shin characters in lieu of the expected icons, I post my scenario for posterity. At some point, the cask for nerd-fonts updated Victor Mono from v2 to v3. Probably it happened at the same time as the others, but I would only notice with Victor Mono. As a result, my my lazygit started to look a bit wonky. The solution that @stefanhaller implemented resolves this, but in case it isn't immediately clear how, you must add nerdFontsVersion: "3" to your configuration's gui section. The default is still v2, but this will get you fixed up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants