2024-06-02 13:26:43 +02:00
|
|
|
|
# SPDX-FileCopyrightText: 2020-2024 Simon Bruder <simon@sbruder.de>
|
2024-01-06 01:19:35 +01:00
|
|
|
|
#
|
|
|
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
|
|
2020-12-05 13:48:06 +01:00
|
|
|
|
{ config, lib, pkgs, ... }:
|
2022-12-10 16:09:10 +01:00
|
|
|
|
let
|
|
|
|
|
iosevka-sbruder = pkgs.iosevka.override {
|
|
|
|
|
privateBuildPlan = {
|
|
|
|
|
family = "Iosevka sbruder";
|
2022-12-21 14:18:01 +01:00
|
|
|
|
spacing = "term";
|
2022-12-10 16:09:10 +01:00
|
|
|
|
serifs = "sans";
|
2024-06-02 13:26:43 +02:00
|
|
|
|
noCvSs = false;
|
|
|
|
|
exportGlyphNames = true;
|
2020-08-22 17:44:39 +02:00
|
|
|
|
|
2022-12-10 16:09:10 +01:00
|
|
|
|
variants = {
|
|
|
|
|
inherits = "ss20";
|
|
|
|
|
|
|
|
|
|
design = {
|
|
|
|
|
capital-g = "toothless-rounded-serifless-hooked";
|
2024-06-02 13:26:43 +02:00
|
|
|
|
four = "closed-serifless";
|
2022-12-10 16:09:10 +01:00
|
|
|
|
six = "closed-contour";
|
|
|
|
|
nine = "closed-contour";
|
|
|
|
|
number-sign = "upright-tall";
|
2023-12-02 18:54:23 +01:00
|
|
|
|
at = "compact";
|
2022-12-21 14:18:01 +01:00
|
|
|
|
cent = "open";
|
2022-12-10 16:09:10 +01:00
|
|
|
|
percent = "dots";
|
|
|
|
|
lig-ltgteq = "slanted";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
weights = {
|
|
|
|
|
regular = {
|
|
|
|
|
shape = 400;
|
|
|
|
|
menu = 400;
|
|
|
|
|
css = 400;
|
|
|
|
|
};
|
|
|
|
|
bold = {
|
|
|
|
|
shape = 700;
|
|
|
|
|
menu = 700;
|
|
|
|
|
css = 700;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
slopes = {
|
|
|
|
|
upright = {
|
|
|
|
|
angle = 0;
|
|
|
|
|
shape = "upright";
|
|
|
|
|
menu = "upright";
|
|
|
|
|
css = "normal";
|
|
|
|
|
};
|
|
|
|
|
italic = {
|
|
|
|
|
angle = 9.4;
|
|
|
|
|
shape = "italic";
|
|
|
|
|
menu = "italic";
|
|
|
|
|
css = "italic";
|
|
|
|
|
};
|
|
|
|
|
};
|
2022-12-21 14:18:01 +01:00
|
|
|
|
|
|
|
|
|
widths = {
|
|
|
|
|
# ensures that extended won’t get built
|
|
|
|
|
normal = {
|
|
|
|
|
shape = 500;
|
|
|
|
|
menu = 5;
|
|
|
|
|
css = "normal";
|
|
|
|
|
};
|
|
|
|
|
};
|
2022-12-10 16:09:10 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
set = "sbruder";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
iosevka-sbruder-nerd-font = pkgs.runCommand "iosevka-sbruder-nerd-font" { } ''
|
|
|
|
|
${pkgs.parallel}/bin/parallel \
|
|
|
|
|
${pkgs.nerd-font-patcher}/bin/nerd-font-patcher \
|
|
|
|
|
--adjust-line-height \
|
|
|
|
|
--complete \
|
|
|
|
|
--careful \
|
|
|
|
|
--outputdir $out \
|
|
|
|
|
::: ${iosevka-sbruder}/share/fonts/truetype/*.ttf
|
|
|
|
|
'';
|
|
|
|
|
in
|
2020-12-05 15:44:58 +01:00
|
|
|
|
lib.mkIf config.sbruder.gui.enable {
|
2020-08-22 17:44:39 +02:00
|
|
|
|
fonts = {
|
2023-12-02 18:54:23 +01:00
|
|
|
|
packages = with pkgs; [
|
2022-12-10 16:09:10 +01:00
|
|
|
|
iosevka-sbruder-nerd-font
|
2021-01-20 16:23:18 +01:00
|
|
|
|
] ++ lib.optionals config.sbruder.full [
|
2020-08-22 17:44:39 +02:00
|
|
|
|
google-fonts # google font collection (free)
|
2020-10-11 13:02:48 +02:00
|
|
|
|
lmodern # Latin Modern for non-latex applications
|
2022-04-23 21:10:27 +02:00
|
|
|
|
noto-fonts-emoji-blob-bin # The most owo emojis (thanks google for killing them)
|
2020-09-25 18:31:43 +02:00
|
|
|
|
source-han-sans
|
|
|
|
|
source-han-serif # CJK fonts
|
2021-01-20 16:23:18 +01:00
|
|
|
|
] ++ lib.optionals (!config.sbruder.full) [
|
|
|
|
|
roboto # default sans-serif font (normally included in google-fonts)
|
2021-01-03 17:07:45 +01:00
|
|
|
|
] ++ lib.optionals config.sbruder.unfree.allowAssets [
|
|
|
|
|
corefonts # good ol’ microsoft fonts
|
2020-08-22 17:44:39 +02:00
|
|
|
|
vistafonts # newer microsoft fonts
|
|
|
|
|
];
|
|
|
|
|
|
2023-12-02 18:54:23 +01:00
|
|
|
|
enableDefaultPackages = true;
|
2020-08-22 17:44:39 +02:00
|
|
|
|
|
2020-09-26 18:10:22 +02:00
|
|
|
|
fontconfig = {
|
|
|
|
|
defaultFonts = {
|
2022-04-23 21:10:27 +02:00
|
|
|
|
emoji = [ "Blobmoji" ];
|
2023-05-30 13:35:56 +02:00
|
|
|
|
monospace = [ "IosevkaSbruder Nerd Font" "Source Han Sans" ];
|
2020-09-26 18:10:22 +02:00
|
|
|
|
sansSerif = [ "Roboto" "Source Han Sans" ];
|
|
|
|
|
serif = [ "Georgia" "Source Han Serif" ];
|
|
|
|
|
};
|
2021-08-05 13:23:07 +02:00
|
|
|
|
localConf = /* xml */ ''
|
2020-09-26 18:10:22 +02:00
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
|
|
|
|
|
<fontconfig>
|
|
|
|
|
<alias>
|
|
|
|
|
<family>system-ui</family>
|
|
|
|
|
<prefer>
|
|
|
|
|
<family>sans-serif</family>
|
|
|
|
|
</prefer>
|
|
|
|
|
</alias>
|
|
|
|
|
</fontconfig>
|
|
|
|
|
'';
|
2020-08-22 17:44:39 +02:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|