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

nixOS KDE plasma stylix breaks emojis in notifications #448

Open
Yeshey opened this issue Jun 22, 2024 · 4 comments
Open

nixOS KDE plasma stylix breaks emojis in notifications #448

Yeshey opened this issue Jun 22, 2024 · 4 comments

Comments

@Yeshey
Copy link

Yeshey commented Jun 22, 2024

Describe the bug

Screenshot_20240622_204926
It's not all emojis that are missing, it's the equivalent of this issue in stack exchange.
Screenshot_20240622_212552
The bug can also be seen in the WIN + V window with the clipboard history, everything else, the emoji picker, fonts in the terminal etc. is working, so i believe it's a plasma specific issue

Steps To Reproduce

I have stylix installed just as a home manager module

  imports = [
    inputs.stylix.homeManagerModules.stylix
  ];

My stylix config

    stylix = {
      enable = lib.mkOverride 1010 true;
      autoEnable = lib.mkOverride 1010 true;
      base16Scheme = "${pkgs.base16-schemes}/share/themes/pop.yaml";
      image = builtins.fetchurl {
           url = "https://images6.alphacoders.com/655/655990.jpg";
           sha256 = "b09b411a9c7fc7dc5be312ca9e4e4b8ee354358daa792381f207c9f4946d95fe";
        };
      polarity = lib.mkOverride 1010 "dark";

      cursor = cfg.cursor;

      opacity = {
        applications = lib.mkOverride 1010 0.88;
        terminal = lib.mkOverride 1010 0.88;
        desktop = lib.mkOverride 1010 0.88;
        popups = lib.mkOverride 1010 0.88;
      };
    };

If needed, here is my config.

Expected behavior

Screenshot_20240622_204426

Workaround

Following this thread, as a workaround we can use the file Kubuntu uses, putting the file 56-kubuntu-noto.conf attached below in ~/.config/fontconfig/conf.d/.
FILE ATTACHED: 56-kubuntu-noto.txt, change the name to 56-kubuntu-noto.conf.

Or use this home manager configuration:

home.file.".config/fontconfig/conf.d/56-kubuntu-noto.conf".source = ./56-kubuntu-noto.conf; # point to the file

Additional context

It's not a nixOS problem, its a stylix problem, as the first issue I made was a nixpkgs one:
NixOS/nixpkgs#321826

Metadata

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.32, NixOS, 24.05 (Uakari), 24.05.20240606.9b5328b`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - channels(root): `"nixos-23.11, nixpkgs"`
 - channels(yeshey): `""`
 - nixpkgs: `/etc/nix/path/nixpkgs`

Add a 👍 reaction to issues you find important.

Yeshey pushed a commit to Yeshey/nixOS-Config that referenced this issue Jun 22, 2024
Yeshey pushed a commit to Yeshey/nixOS-Config that referenced this issue Jun 22, 2024
@trueNAHO
Copy link
Collaborator

Related: #201

@danth
Copy link
Owner

danth commented Jun 26, 2024

As pointed out in the linked issue: this is probably caused by not having the emoji font as a fallback under sans-serif.

@Yeshey
Copy link
Author

Yeshey commented Jun 26, 2024

As pointed out in the linked issue: this is probably caused by not having the emoji font as a fallback under sans-serif.

I tried to explicitly define fonts:

stylix.fonts = {
        /*
        sizes = {
          applications = 10;
          terminal = 12;
          desktop = 10;
          popups = 9;
        }; */

        serif = {
          package = pkgs.dejavu_fonts;
          name = "DejaVu Serif";
        };

        monospace = {
          package = pkgs.nerdfonts;
          name = "Fira Code nerd Font Mono";
        };

        sansSerif = {
          package = pkgs.dejavu_fonts;
          name = "DejaVu Sans";
        };

        emoji = {
          package = pkgs.noto-fonts-emoji;
          name = "Noto Color Emoji";
        };
      }; 

but the problem persisted, my workaround above is still needed. But maybe this issue should be closed in favour of that mencioned above?

@danth
Copy link
Owner

danth commented Jun 26, 2024

In extension to #201, we should also automatically include the emoji font as a fallback to fix this issue - so some more changes are needed.

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