@@ -0,0 +1,28 @@
1+import ./make-test.nix ({ lib, ... }:
2+{
3+ name = "fontconfig-default-fonts";
4+
5+ machine = { config, pkgs, ... }: {
6+ fonts.enableDefaultFonts = true; # Background fonts
7+ fonts.fonts = with pkgs; [
8+ noto-fonts-emoji
9+ cantarell-fonts
10+ twitter-color-emoji
11+ source-code-pro
12+ gentium
13+ ];
14+ fonts.fontconfig.defaultFonts = {
15+ serif = [ "Gentium Plus" ];
16+ sansSerif = [ "Cantarell" ];
17+ monospace = [ "Source Code Pro" ];
18+ emoji = [ "Twitter Color Emoji" ];
19+ };
20+ };
21+
22+ testScript = ''
23+ $machine->succeed("fc-match serif | grep '\"Gentium Plus\"'");
24+ $machine->succeed("fc-match sans-serif | grep '\"Cantarell\"'");
25+ $machine->succeed("fc-match monospace | grep '\"Source Code Pro\"'");
26+ $machine->succeed("fc-match emoji | grep '\"Twitter Color Emoji\"'");
27+ '';
28+})