-
Notifications
You must be signed in to change notification settings - Fork 533
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
[Linux] Question about fallback fonts #75
Comments
Could you try with this font: https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/FiraCode/Retina/complete Give me a sec to write up a blurb about the font recognition |
Sure, just a sec. |
Neovide relies on Skribo (a largely unfinished project by Raph Levien) to delegate to harfbuzz its rendering. https://github.com/linebender/skribo I have plans to embed fonts for the nerd portion, the emojis, and a basic ligature enabled monospace font, but I haven't done it yet. |
The font collection is built here: https://github.com/Kethku/neovide/blob/master/src/renderer/caching_shaper.rs#L36 |
Thanks for the pointer into the code; I'll take a look and see if I can add some debug logging to figure out what's happening when I have a chance (which may not be immediately). |
I suspect the name you are using is incorrect. Maybe try "FiraCode\ Nerd\ Font:h11" the name should be the font name not the name of the file. |
No problem! The extra rendering issues I believe are from emoji fonts? I'm not sure. Maybe it would be helpful to get a list of fallback fonts kitty uses? |
The exact codepoints may be useful. Its hard to figure out what set of fonts is necessary for all use cases |
Sure. On my system,
The codepoints are:
One other (probably unrelated) note: I get a segfault every time I exit; seems likely to be #73. |
And yeah, supporting everybody's preferred fonts/font needs seems really very hard. |
Do you still get the segfault on current master? I tried to fix it :( |
Also interesting. Are tilde plus and star really not rendering? I could see the other ones failing but those should work |
Unfortunately yes :/ The exact error output is
If you think it's not #73 I'll open a new issue to avoid cluttering this one. |
No it seems likely to be similar |
re: Tilde, plus, and star: The normal (ASCII) versions of those symbols work, but the symbols I sent above are full-width versions (the rendering in terminal The characters are these: |
woah til |
Any chance you know which of your fonts they come from? |
Noticed underlines were broken btw in your screencap, so I fixed them. Thanks for the detailed report |
From the |
Haha, nice catch. I hadn't even noticed that myself. |
Ok so looks like its a font specialized towards double width characters from non latin based languages. So to solve all of these in one go, I need to embed a standard monospace, a wide space, and a nerd font. Ideally all with normal, bold, italic, and bold-italic variants. That seems doable |
Oh also an emoji font. So 3 * 4 + 1 (emoji) in total |
Yikes, sorry :/ That sounds like a lot. Any way I can help (with the caveat that my time for hacking is limited at the moment)? |
Nah shouldn't be too bad actually. I already have an embedding system that should work and I think I'm just going to embed the fira code fonts. One thing I need to figure out is a license compliant way to display the font license. Maybe I should create a special NeovideFontLicenses command which writes the license to disk and opens them in the editor... |
Maybe I'll default on my MS roots and embed Cascadia Code ;) |
Hmm, it's unfortunately not as clear from the logs, but my guess would be either 3270-Medium Nerd Font Complete Mono or Symbola? |
Its not the Nerd Font Complete because I already embed a version of that. Its probably a symbol font... Its frustrating because the real solution is to do os specific font fallback, but there isn't a rust library that does that today. Skribo has it on the roadmap, but as far as I can tell it doesn't do it yet. |
So I think my answer is that this is fixed as far as its going to go for now. To really solve it I need better library support (or to write my own) or maybe provide a method for letting the user manually list what fonts they want in their font fallback cascade. Does this solve it sufficiently for you for now? |
Yeah, seems totally reasonable. Thanks! |
@wbthomason Can you share your sidebar and statusline details (plugin+config) Sorry for the spam |
@PitcherTear22: I don’t actually use that statusline config anymore, but it was custom (not a plugin) and adapted from https://github.com/elenapan/dotfiles/blob/master/config/nvim/statusline.vim You can see my current config files at https://github.com/wbthomason/dotfiles/tree/linux/neovim/.config/nvim; if you’re specifically interested in the statusline and sign config, those are mostly in:
My colorscheme (responsible for some of the side bar, etc.) is https://github.com/wbthomason/vim-nazgul Hope this helps! |
I'm having an issue with fallback fonts (I think?), and was wondering if more information about how that mechanism works could help me debug.
For context, I'm on Arch Linux, building from
master
. When I runneovide
, I get something that looks like the below:Note the improperly rendered characters in the statusline. In the terminal (
kitty
, specifically), the same view looks like:with symbols correctly rendered. The same font (Fira Code Retina) is set as both my terminal font and my
guifont
inginit.vim
.Given that I know
kitty
does use fallback font handling for symbols (particularly the "Nerd Font" symbols), I'm guessing that there's some issue with howneovide
is choosing a fallback font on my system.Can you elaborate on how the fallback mechanism works/where in the code I should be reading to try and debug this? Thanks!
The text was updated successfully, but these errors were encountered: