diff options
-rw-r--r-- | sys/font/default.nix | 21 | ||||
-rw-r--r-- | sys/font/font.xml | 25 |
2 files changed, 41 insertions, 5 deletions
diff --git a/sys/font/default.nix b/sys/font/default.nix index 303efcf7..cad579b9 100644 --- a/sys/font/default.nix +++ b/sys/font/default.nix @@ -1,21 +1,32 @@ -{pkgs, ...}: let +{ + pkgs, + lib, + ... +}: let nerdFont = pkgs.nerdfonts.override { fonts = [ "SourceCodePro" + "Overpass" ]; }; in { - # TODO: maybe add other fonts? fonts = { packages = [ nerdFont + pkgs.noto-fonts-emoji ]; + #localConf = builtins.readFile ./font.xml; fontconfig = { defaultFonts = { - # serif = ["Vazir"]; - # sansSerif = ["Vazir"]; - monospace = ["SourceCodePro"]; + # FIXME: Add a serif font <2023-08-28> + serif = []; + sansSerif = lib.mkForce ["Overpass Sans Serif"]; + monospace = lib.mkForce ["Sauce Code Pro Mono"]; + emoji = lib.mkForce ["Noto Color Emoji"]; }; + allowType1 = false; + allowBitmaps = false; }; }; + console.font = "Saurce Code Pro Mono"; } diff --git a/sys/font/font.xml b/sys/font/font.xml new file mode 100644 index 00000000..4248cc01 --- /dev/null +++ b/sys/font/font.xml @@ -0,0 +1,25 @@ +<!-- NOTE: This is responsible for color emoji support <2023-08-28> --> +<!-- WARNING: This [link](https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/111#note_630720) + contains some discussion about, the below code. But it's down right now. <2023-08-28> --> +<?xml version="1.0"?> +<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> +<fontconfig> + <alias binding="weak"> + <family>monospace</family> + <prefer> + <family>emoji</family> + </prefer> + </alias> + <alias binding="weak"> + <family>sans-serif</family> + <prefer> + <family>emoji</family> + </prefer> + </alias> + <alias binding="weak"> + <family>serif</family> + <prefer> + <family>emoji</family> + </prefer> + </alias> +</fontconfig> |