fonts: Use custom Iosevka variant

I don’t like the new defaults.
nazuna
Simon Bruder 2022-12-10 16:09:10 +01:00
parent 91ec565702
commit b6a903551e
Signed by: simon
GPG Key ID: 8D3C82F9F309F8EC
3 changed files with 68 additions and 3 deletions

View File

@ -1,9 +1,74 @@
{ config, lib, pkgs, ... }:
let
iosevka-sbruder = pkgs.iosevka.override {
privateBuildPlan = {
family = "Iosevka sbruder";
spacing = "normal";
serifs = "sans";
no-cv-ss = false;
export-glyph-names = true;
variants = {
inherits = "ss20";
design = {
capital-g = "toothless-rounded-serifless-hooked";
four = "closed";
six = "closed-contour";
eight = "two-circles";
nine = "closed-contour";
number-sign = "upright-tall";
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";
};
};
};
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
lib.mkIf config.sbruder.gui.enable {
fonts = {
fonts = with pkgs; [
(nerdfonts.override { fonts = [ "Iosevka" ]; }) # default monospace font
iosevka-sbruder-nerd-font
] ++ lib.optionals config.sbruder.full [
google-fonts # google font collection (free)
lmodern # Latin Modern for non-latex applications

View File

@ -70,7 +70,7 @@ in
config = {
# Main application font
osd-font = "Iosevka Nerd Font";
osd-font = "monospace";
# Subtitles (adapted from https://github.com/LightArrowsEXE/dotfiles/blob/75973b6c8493368bbdee6e8e632964045fcf22ec/mpv/.config/mpv/mpv.conf#L76)
sub-bold = true;

View File

@ -1,7 +1,7 @@
* {
border-radius: 0;
border: none;
font-family: "Iosevka Nerd Font";
font-family: "monospace";
font-size: 12px;
min-height: 0;
transition-property: none;