2023-12-16 19:26:15 +01:00
|
|
|
{ pkgs, config, lib, ... }:
|
|
|
|
with lib;
|
2024-02-17 18:49:37 +01:00
|
|
|
let cfg = config.voidconf.fontConfig;
|
2023-12-16 19:26:15 +01:00
|
|
|
in {
|
2024-02-17 18:49:37 +01:00
|
|
|
options.voidconf.fontConfig = {
|
2023-12-16 19:26:15 +01:00
|
|
|
enable = mkEnableOption "Enable opinionated font configuration";
|
|
|
|
joyPixels = mkEnableOption "Enables the JoyPixels font";
|
|
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
fonts = {
|
|
|
|
fontDir.enable = true;
|
|
|
|
packages = with pkgs; [
|
|
|
|
(nerdfonts.override { fonts = [ "FiraCode" "Iosevka" ]; })
|
2024-05-19 15:27:40 +02:00
|
|
|
baekmuk-ttf
|
|
|
|
blackout
|
|
|
|
bqn386
|
2024-03-05 16:50:50 +01:00
|
|
|
fira
|
2024-05-19 15:27:40 +02:00
|
|
|
fira-code
|
2024-03-05 16:50:50 +01:00
|
|
|
font-awesome
|
2024-05-19 15:27:40 +02:00
|
|
|
iosevka
|
|
|
|
ipafont
|
|
|
|
jetbrains-mono
|
2024-03-05 16:50:50 +01:00
|
|
|
liberation_ttf
|
|
|
|
libertine
|
|
|
|
libertinus
|
2024-05-19 15:27:40 +02:00
|
|
|
mononoki
|
|
|
|
mplus-outline-fonts.githubRelease
|
2024-03-05 16:50:50 +01:00
|
|
|
noto-fonts
|
2024-05-19 15:27:40 +02:00
|
|
|
noto-fonts-emoji
|
2024-03-05 16:50:50 +01:00
|
|
|
prociono
|
2024-05-19 15:27:40 +02:00
|
|
|
ubuntu_font_family
|
2024-03-05 16:50:50 +01:00
|
|
|
uiua386
|
2024-05-19 15:27:40 +02:00
|
|
|
vollkorn
|
2023-12-16 19:26:15 +01:00
|
|
|
];
|
|
|
|
fontconfig = {
|
|
|
|
enable = true;
|
|
|
|
includeUserConf = true;
|
|
|
|
antialias = true;
|
|
|
|
hinting.enable = true;
|
|
|
|
|
|
|
|
defaultFonts = {
|
2024-05-21 11:04:23 +02:00
|
|
|
serif = [ "Vollkorn" "Fira Code" "IPAMincho" "Baekmuk Headline" "Noto Color Emoji" ];
|
|
|
|
sansSerif = [ "FiraSans" "Fira Code" "IPAGothic" "Baekmuk Headline" "Noto Color Emoji" ];
|
|
|
|
monospace = [ "Fira Code" "JetBrains Mono" "Iosevka" "IPAGothic" "Baekmuk Headline" "Noto Color Emoji" ];
|
2023-12-16 19:26:15 +01:00
|
|
|
emoji = [ "Noto Color Emoji" (mkIf cfg.joyPixels "JoyPixels") ];
|
|
|
|
};
|
|
|
|
|
|
|
|
localConf = ''
|
|
|
|
<fontconfig>
|
|
|
|
|
|
|
|
<match target="scan">
|
|
|
|
<test name="family">
|
|
|
|
<string>APL385 Unicode</string>
|
|
|
|
</test>
|
|
|
|
<edit name="spacing">
|
|
|
|
<int>100</int>
|
|
|
|
</edit>
|
|
|
|
</match>
|
|
|
|
|
|
|
|
<match target="scan">
|
|
|
|
<test name="family">
|
|
|
|
<string>BQN386 Unicode</string>
|
|
|
|
</test>
|
|
|
|
<edit name="spacing">
|
|
|
|
<int>100</int>
|
|
|
|
</edit>
|
|
|
|
</match>
|
|
|
|
|
|
|
|
<match target="scan">
|
|
|
|
<test name="family">
|
|
|
|
<string>Uiua386</string>
|
|
|
|
</test>
|
|
|
|
<edit name="spacing">
|
|
|
|
<int>100</int>
|
|
|
|
</edit>
|
|
|
|
</match>
|
|
|
|
|
|
|
|
</fontconfig>
|
|
|
|
'';
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|