nix-output-monitor
nix-output-monitor copied to clipboard
Missing/unsupported glyph(s), even with NerdFont?
Hi!
I'm running nushell inside of tmux with this nerdfont installation (all installed through home-manager):
{pkgs, ...}: {
fonts.fontconfig.enable = true;
home.packages = [
(pkgs.nerdfonts.override {
fonts = ["Hasklig"];
})
];
}
Yet, as below picture shows, there's one (or more) glyphs that don't render?
(Please notice how all other glyps, including the ones from starship
prompt do load/render).
If NerdFont doesn't support it, how/where else should we look for the glyphs nom
intends to use? =S
Screenshot 1
Screenshot 2
EDIT: Above screenshots taken of gnome-terminal application running nushell inside (and outside) of tmux.
Seems related to (but not really same as) #80...
Hey there. Those emojis are a support nightmare. Maybe nom should bundle its font and its terminal.^^
The glyph in questions seems to be the "play" arrow. I am also using nerdfonts and that is actually one of the mor ecommon symbols so I have no clue why that problem is happening. Have you tried in a different terminal/without tmux maybe one of those break the encoding?
Nushell w/o tmux
Bash w/o tmux
Yeah, I mean it was unlikely for nushell to be the problem.
Looking at your config a bit closer. Are you actually sure your terminal is using Hasklig NerdFont? At least the part of your config that you showed does not ensure that.
Yeah, I mean it was unlikely for nushell to be the problem.
I honesly don't know enough about this to say whether it should or shouldn't =)
I thought it pertinent to show with and without, due to always having to invoke nom
through bash for the usecase of nix flake check
on Nushell (complete
& stderr/stdout, and combining stdout and stderr redirection).*
Looking at your config a bit closer. Are you actually sure your terminal is using Hasklig NerdFont? At least the part of your config that you showed does not ensure that.
Hmmm... How do I prove this (to you and me both) then? I tried googling "How to test nerdfonts works", but got nowhere... Found this though https://github.com/ryanoasis/nerd-fonts/discussions/829, which basically says this is impossible.
These(https://nix-community.github.io/home-manager/options.html#opt-fonts.fontconfig.enable) two(https://discourse.nixos.org/t/home-manager-nerdfonts/11226/2) sources are what I used to land on said configuration.
- Maybe you'd want me to open up a separate github issue requesting support for
nom flake check
? Or maybe justnom flake
?
I managed to install Kitty, instead of the default gnome-terminal terminal emulator available on Linux Mint.
Does this look correct?
Doesn't quite look like the "play" icons you referenced here:
The glyph in questions seems to be the "play" arrow.
Yeah, please make a new issue for nom flake
.
Yeah, the emoji also looks wrong in kitty.
I generally look very closely at the letters maybe on a big fontsize and compare them with a picture of the font online. Normally you quickly see if the font is different.
Would you agree this looks identical?
I see that the =>
is not identical, but I think that might have something to do with the animation of characters combining into a new one...
Yeah, ligature support (which you need for the nice implication symbol connected over two cells) in terminals is rare.
But actually I would say it is clear those two fonts are not the same: Compare e.g. the lower end of the large Q which is much more curved and longer in Hasklig. In general most letters in Hasklig look slightly more curved. Ah, now I see: the biggest difference is the small g. Definitely not the same font.
Damn, you're correct. I apologize for my errant claim! Let's see if this thread is still relevant when I get it configured correctly.
I fixed it! NerdFont Hasklug is now used!
It was the terminal emulator (gnome-terminal) which didn't support ligatures, and used the wrong font.
The missing yellow icons are still missing... =/
However, with the below new home-manager nix config, I believe I am using the correct font.
Nix home-manager config leveraging nerdfont
{
config,
lib,
pkgs,
...
}: let
hasklugNerdFont = pkgs.nerdfonts.override {
fonts = ["Hasklig"];
};
in {
fonts.fontconfig.enable = true;
programs.kitty = lib.mkIf config.programs.kitty.enable {
font = {
package = hasklugNerdFont;
name = "Hasklug Nerd Font Mono";
};
};
}
NB: Notice the profile
comment of https://nix-community.github.io/home-manager/options.html#opt-programs.kitty.font.package!
Visual proof of Hasklug in use
Congrats! Enjoy the font!
But that didn’t fix the glyphs? That is weird and unsatisfying. I am kind of at a loss what else could be the culprit …
Congrats! Enjoy the font!
Thank you! =)
But that didn’t fix the glyphs? That is weird and unsatisfying. I am kind of at a loss what else could be the culprit …
I tried again now with non-mono font version, no change =/
Adding the NerdFontsSymbolsOnly
font to kitty +list-fonts
didin't help either =/
I've also had some issues with this. The unicode character in question here, U+23F5 (⏵), is not part of NerdFonts as far as I can tell (same with the hourglass U+23F3). For me, installing Symbola using fonts.fonts = [pkgs.symbola];
in my system configuration to have a good fallback fonts for symbols like this that are neither part of standard fonts nor emoji nor part of NerdFonts fixed the problem.
Edit: see https://www.fileformat.info/info/unicode/char/23f5/fontsupport.htm for an incomplete list of fonts supporting the character in question. Symbola as my personal favourite font for this is listed as supporting U+23F5.
I ran into this issue and installing the symbola font has resolved it.
Edit - Just read the comment above :facepalm:
~The hourglass symbol is still missing for me (the one in orange I think?), even with symbola.otf listed in fc-list
=/~
EDIT: Correction, ignore me. I went into the same trap again. It's not enough to start a new shell. I need to start a new terminal emulator for the changes to be picked up.
Many thanks to @999eagle for the find! And thanks to @flexiondotorg for the confirmation/kick in the rear to finally fix it =)
Also, nom does not use the hourglass symbol anymore. (Although I am not 100% sure that’s released, yet.)