fontconfig: remove no-longer-needed cache; disable Font Awesome (emoji seem well-covered by Noto Color Emoji)

This commit is contained in:
Colin 2024-03-13 05:28:57 +00:00
parent eafabe87c4
commit 8dacb93861

View File

@ -1,6 +1,10 @@
# to preview fonts: # to preview fonts:
# - `font-manager` (gui) # - `font-manager` (gui)
# - useful to determine official name; codepoint support # - useful to determine official name; codepoint support
# docs:
# - <https://slatecave.net/notebook/fontconfig/>
# debugging:
# - `fc-conflist` -> show all config files loaded
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let
# nerdfonts takes popular open fonts and patches them to support a wider range of glyphs, notably emoji. # nerdfonts takes popular open fonts and patches them to support a wider range of glyphs, notably emoji.
@ -32,10 +36,10 @@ in
sandbox.method = "bwrap"; # TODO:sandbox: untested sandbox.method = "bwrap"; # TODO:sandbox: untested
sandbox.autodetectCliPaths = "existingOrParent"; #< this might be overkill; or, how many programs reference fontconfig internally? sandbox.autodetectCliPaths = "existingOrParent"; #< this might be overkill; or, how many programs reference fontconfig internally?
persist.byStore.plaintext = [ # persist.byStore.plaintext = [
# < 10 MiB # # < 10 MiB. however, nixos generates its own fontconfig cache at build time now.
".cache/fontconfig" # ".cache/fontconfig"
]; # ];
}; };
fonts = lib.mkIf config.sane.programs.fontconfig.enabled { fonts = lib.mkIf config.sane.programs.fontconfig.enabled {
@ -43,8 +47,8 @@ in
fontconfig.defaultFonts = { fontconfig.defaultFonts = {
emoji = [ emoji = [
"Noto Color Emoji" "Noto Color Emoji"
"Font Awesome 6 Free" # "Font Awesome 6 Free"
"Font Awesome 6 Brands" # "Font Awesome 6 Brands"
]; ];
monospace = [ monospace = [
"Hack Nerd Font Propo" "Hack Nerd Font Propo"
@ -66,7 +70,7 @@ in
# TODO: reduce this font set. # TODO: reduce this font set.
# - probably need only one of dejavu/freefont/liberation # - probably need only one of dejavu/freefont/liberation
dejavu_fonts # 10 MiB; DejaVu {Sans,Serif,Sans Mono,Math TeX Gyre}; also available as a NerdFonts (Sans Mono only) dejavu_fonts # 10 MiB; DejaVu {Sans,Serif,Sans Mono,Math TeX Gyre}; also available as a NerdFonts (Sans Mono only)
font-awesome # 2 MiB; Font Awesome 6 {Free,Brands} # font-awesome # 2 MiB; Font Awesome 6 {Free,Brands}
freefont_ttf # 11 MiB; Free{Mono,Sans,Serif} freefont_ttf # 11 MiB; Free{Mono,Sans,Serif}
gyre-fonts # 4 MiB; Tex Gyre *; ttf substitutes for standard PostScript fonts gyre-fonts # 4 MiB; Tex Gyre *; ttf substitutes for standard PostScript fonts
# hack-font # 1 MiB; Hack; also available as a NerdFonts # hack-font # 1 MiB; Hack; also available as a NerdFonts