diff --git a/nixos/profiles/common/graphical/home/fonts/default.nix b/nixos/profiles/common/graphical/home/fonts/default.nix index cb081be..3cad736 100644 --- a/nixos/profiles/common/graphical/home/fonts/default.nix +++ b/nixos/profiles/common/graphical/home/fonts/default.nix @@ -1,10 +1,8 @@ {pkgs, ...}: { - fonts.fontconfig.enable = true; + # Fontconfig xdg.configFile = { - "fontconfig" = { - source = ./fontconfig; - recursive = true; - }; + "fontconfig/fonts.conf".source = ./fonts.conf; + "fontconfig/conf.d/web-ui-fonts.conf".source = pkgs.fetchurl { url = "https://raw.githubusercontent.com/lilydjwg/dotconfig/1b22d4f0740bb5bbd7c65b6c468920775171b207/fontconfig/web-ui-fonts.conf"; hash = "sha256-A4DcV6HTW/IRxXN3NaI1GUfoFdalwgFLpCjgbWENdZU="; @@ -15,28 +13,20 @@ }; }; - gtk.font.name = "Sans"; + # Make GTK listen to fontconfig dconf.settings = { "org/gnome/desktop/wm/preferences" = { "titlebar-font" = "Sans Bold"; }; "org/gnome/desktop/interface" = { + "font-name" = "Sans"; "document-font-name" = "Sans"; "monospace-font-name" = "Monospace"; - # "font-name" is unneeded - # https://github.com/nix-community/home-manager/blob/8765d4e38aa0be53cdeee26f7386173e6c65618d/modules/misc/gtk.nix#L237C19-L237C19 }; }; - xresources.properties = { - # Fonts - "Xft.autohint" = "0"; - "Xft.lcdfilter" = "lcddefault"; - "Xft.hintstyle" = "hintslight"; - "Xft.hinting" = "1"; - "Xft.antialias" = "1"; - "Xft.rgba" = "rgb"; - }; + # HM managed fonts + fonts.fontconfig.enable = true; home.packages = with pkgs; [ ### Inter inter diff --git a/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/nixos-fonts.conf b/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/nixos-fonts.conf deleted file mode 100644 index 1881219..0000000 --- a/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/nixos-fonts.conf +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - DejaVu Sans - - - - diff --git a/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/old-chinese-fonts.conf b/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/old-chinese-fonts.conf deleted file mode 100644 index d306b42..0000000 --- a/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/old-chinese-fonts.conf +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - WenQuanYi Zen Hei - sans-serif - - - WenQuanYi Micro Hei - sans-serif - - - WenQuanYi Micro Hei Light - sans-serif - - - diff --git a/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/qt-fonts.conf b/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/qt-fonts.conf deleted file mode 100644 index 8c7b5a9..0000000 --- a/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/qt-fonts.conf +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - sans-serif - - - Noto Sans Glagolitic - - Noto Sans Javanese - - Noto Serif Tangut - - Noto Sans Egyptian Hieroglyphs - - Noto Sans Cuneiform - - HanaMinB - - Noto Sans Rejang - - Noto Sans Tai Viet - - Noto Sans Cherokee - - Noto Sans Tai Tham - - Noto Sans Anatolian Hieroglyphs - - Noto Sans Bamum - - OperatorMonoSSmLig Nerd Font - - Noto Sans Batak - - Noto Sans Runic - - - - diff --git a/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/unliked-fonts.conf b/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/unliked-fonts.conf deleted file mode 100644 index f343a78..0000000 --- a/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/unliked-fonts.conf +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - Liberation Mono - monospace - - - SF Mono - monospace - - - Noto Sans Mono - monospace - - - diff --git a/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/windows-fonts.conf b/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/windows-fonts.conf deleted file mode 100644 index 02e11b8..0000000 --- a/nixos/profiles/common/graphical/home/fonts/fontconfig/conf.d/windows-fonts.conf +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - Microsoft YaHei - sans-serif - - - SimHei - sans-serif - - - - SimSun - serif - - - SimSun-18030 - serif - - - diff --git a/nixos/profiles/common/graphical/home/fonts/fontconfig/fonts.conf b/nixos/profiles/common/graphical/home/fonts/fontconfig/fonts.conf deleted file mode 100644 index f026ff0..0000000 --- a/nixos/profiles/common/graphical/home/fonts/fontconfig/fonts.conf +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - trash Font Config 3.0 - - - - - - - false - false - true - hintslight - rgb - lcddefault - 96 - - - - - serif - Source Han Serif SC VF - - - sans-serif - Inter - - - monospace - JetBrainsMono Nerd Font - - - system-ui - Inter - - - - - - - serif - Source Han Serif SC VF - - - sans-serif - Source Han Sans SC VF - - - monospace - Source Han Sans SC VF - - - system-ui - Source Han Sans SC VF - - - diff --git a/nixos/profiles/common/graphical/home/fonts/fonts.conf b/nixos/profiles/common/graphical/home/fonts/fonts.conf new file mode 100644 index 0000000..a6acc6e --- /dev/null +++ b/nixos/profiles/common/graphical/home/fonts/fonts.conf @@ -0,0 +1,112 @@ + + + + + + + trash Font Config 4.0 + + + + true + hintslight + false + false + lcddefault + rgb + + + + + serif + + Source Han Serif SC VF + Noto Color Emoji + + + + + sans-serif + + Inter + Source Han Sans SC VF + Noto Color Emoji + + + + + monospace + + JetBrainsMono Nerd Font + Source Han Sans SC VF + Noto Color Emoji + + + + + system-ui + + Inter + Source Han Sans SC VF + Noto Color Emoji + + + + + + + + + Microsoft YaHei + sans-serif + + + SimHei + sans-serif + + + WenQuanYi Zen Hei + sans-serif + + + WenQuanYi Micro Hei + sans-serif + + + WenQuanYi Micro Hei Light + sans-serif + + + + + SimSun + serif + + + SimSun-18030 + serif + + + + + Liberation Mono + monospace + + + SF Mono + monospace + + + Noto Sans Mono + monospace + + + + + + + DejaVu Sans + + + +