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

Nerd Font 3 Issue #88

Closed
R00dRallec opened this issue Jun 5, 2023 · 4 comments
Closed

Nerd Font 3 Issue #88

R00dRallec opened this issue Jun 5, 2023 · 4 comments

Comments

@R00dRallec
Copy link

Nvy: v0.3.5
NeoVim: 0.9 (also occurs with 0.10-dev)

With the upgrade to Nerd Fonts 3, I am facing issues with the material design symbols.
Other symbols are working fine, it seems to be related with the material design category (educated guess as of now):
May be related to one of their breaking changes: ryanoasis/nerd-fonts#365.

For example with nf-md-close_circle_outline (0xf015a) [1], Nvy is not displaying it correctly.
If the text gets selected, the symbol gets rendered correctly.
As soon as the visual mode is exited, the symbol is again not displayed properly.

Nvy-nerd-font-issue

The symbol itself works fine with Windows Terminal, nvim-qt and Neovide.

[1] https://www.nerdfonts.com/cheat-sheet

@R00dRallec
Copy link
Author

I started to analyze the issue and ended up at the surrogate pair check:

if (strlen == 0) {

For me it looks like the check to determine the surrogate pair (Code points from U+010000 to U+10FFFF) does no longer work with the strlen == 0 check.

I'll try to dig deeper into this topic if time permits, any feedback on the correctness of the first analysis is highly appreciated.

@RMichelsen
Copy link
Owner

I've tried to debug this and have come to the same conclusion that the spec says:
The right cell of a double-width char will be represented as the empty string. Double-width chars never use repeat.

However this right cell is never sent, we never receive the empty string.

As a general note, Nvy was not written with unicode characters in mind so it has some pretty naive handling of these surrogate pairs and unicode characters. Maybe at some point a larger rewrite is warranted with this in mind, however for most purposes it seems that this simple handling is enough. I suspect nvim-qt and Neovide detect and handle these unicode characters without the help of the second empty string being sent from neovim.

@Zorbn
Copy link
Contributor

Zorbn commented Oct 3, 2023

This should be fixed by #97. I tested with nf-md-close_circle_outline in a couple of Nerd Fonts, and everything looked good.

@RMichelsen
Copy link
Owner

Closed via #97

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants