Not showing unicode characters

Hello.
I am unable to make the system show unicode chars correctly.
for example i3status is like this: (boxes should be characters)
52%  |  69.8 GB | | | |  63°C |  01% |  0.56 | 39  Friday 29.September  22:25:52

I have tweaked a lot with options but still no luck!

the font section in configuration is:

fonts = {
enableDefaultFonts = true;
fontDir.enable = true;
enableGhostscriptFonts = true;

fonts = with pkgs; [ 
  noto-fonts
  noto-fonts-cjk
  noto-fonts-emoji
  source-code-pro
  noto-fonts-emoji
  ubuntu_font_family
  dejavu_fonts

  # Persian Font
  vazir-fonts
  shabnam-fonts
  vazir-code-font
];

fontconfig = {

  localConf = ''
<?xml version='1.0'?> Vazirmatn ~/.local/share/fonts '';
  antialias = true;
  cache32Bit = true;
  hinting.autohint = true;
  hinting.enable = true;

  defaultFonts = {
    serif = [ "Vazirmatn" "Ubuntu" ];
    sansSerif = [ "Vazirmatn" "Ubuntu" ];
    monospace = [ "Ubuntu" ];
    emoji = [ "Noto Color Emoji" ];
  };
};

};

I would really appreciate any help.
Thanks.

I got the same Issue, I wonder if it beacause of wayland, could you solve it? Very thankful for any help.

1 Like

I think I am not using wayland.
No, I have not solved the problem.
I have the same problem in Debian but Arch works.

Hi, I have the same problem I think.

I am using gnome (wayland), and many fonts seem missing.
Very annoying bug and haven’t found any fix yet

Current fonts config in configuration.nix

fonts.packages = with pkgs; [
  noto-fonts
  noto-fonts-cjk
  noto-fonts-emoji
  liberation_ttf
  fira-code
  fira-code-symbols
  mplus-outline-fonts.githubRelease
  dina-font
  proggyfonts
];

fonts.fontconfig.defaultFonts.emoji = ["Noto Color Emoji"]; 

This is how those characters show up on my system:

image

PS: If there was a way to have all unicode characters with a defined meaning on my system, for every alphabet from every language and every emoji I would do it. even if it was like 100GB

I had a similar problem while using an old polybar config. The problem i was having was because my font (in my case SpaceMono) did not include any nerd font symbols, after switching to using nerd font the issue was fixed.

 fonts = {
        enableDefaultPackages = true;
        fontDir.enable = true;

        packages = with pkgs; [
            (nerdfonts.override { fonts = [
                "SpaceMono" 
                "JetBrainsMono"
                "DejaVuSansMono"
             ]; })
        ];
    };

Give it a try!

Thanks, for the suggestion!

I installed and added nerdfonts to fonts.packages without any overloading, so I guess I installed all the nerdfonts. problem seems to persist :thinking: even after rebooting

I’m wandering if i3 status is using the wrong font or something.

If you don’t mind, can you share your i3status configs? I want to see if I can reproduce the error in my machine!

1 Like