-
-
Notifications
You must be signed in to change notification settings - Fork 971
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
Private Use Unicode characters not rendered on macOS with bold/italic set #6043
Comments
This will be a limitation of CoreText, which is used for fallback on It might be worth working around this by detecting when CoreText is |
|
LunarVim uses the nf-dev-git_branch devicon inside the 'b' section of its statusline. Most colorschemes use bold text in the corresponding highlight group(s), resulting in rendering glitches on macOS while relying on kitty's font fallback mechanism. This affects all symbols in the Private Use Unicode range, but this particular one seems to be the only problematic symbol in my current Vim setup. Ref. kovidgoyal/kitty#6043
master now correctly applies bold and italics to fallback fonts. My diagnosis of this issue was likely incorrect to start with, as before my latest fix kitty did not use bold/italic attributes at all when looking for fallback fonts on macOS. The problem was likely CoreText fallback using a different font than nerd font for those code points. In any case the proper fix is to use symbol_map to ensure kitty uses the font you want for these symbols, regardless of CoreText's mysterious fallback algorithms. |
Describe the bug
With
Symbols Nerd Font Mono
used as fallback font, characters in the Private Use Unicode range disappear or are rendered improperly when the italic or bold attributes are set.For example:
U+E725
— which is used for nf-dev-git_branch — becomes invisible.U+E0A0
— which is used for nf-pl-branch — turns into a different symbol.I assume this is happening because the fallback font doesn't have a Bold or Italic variant installed, which might not even be true because things work fine with a Regular patched font (see additional comments).
To Reproduce
Install
Symbols Nerd Font Mono 2048-em
, which kitty should automatically fall back to.Open (Neo)vim (defaults)
Ensure the
StatusLine
highlight group hascterm=bold
orcterm=italic
.Screenshots
Below, there should be a
U+E725
symbol between the twox
, but not when the line is commented:Environment details
Debug output
Additional context
Can't reproduce with a patched Nerd Font, even if I only install the Regular style.
The text was updated successfully, but these errors were encountered: