1

feat: package space-grotesk for serif and sans-serif interface fonts

This commit is contained in:
Himadri Bhattacharjee
2025-02-12 13:31:49 +05:30
parent 79b1c9190d
commit e795a3d0dd
2 changed files with 60 additions and 16 deletions

View File

@@ -0,0 +1,41 @@
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation {
pname = "space-grotesk";
version = "2.0";
src = fetchFromGitHub {
owner = "floriankarsten";
repo = "space-grotesk";
rev = "03507d024a01282884232081fc6011c09ff4e849";
hash = "sha256-NvDJeIJYGn3sNGGuOLYz9jQf/NKvt8jsZdhwsliHzzM=";
};
installPhase = ''
mkdir -p $out/share/fonts/truetype
cp -a fonts/ttf/static/*.ttf $out/share/fonts/truetype/
'';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "J5c2KyhNnnqtjKAbUTsLVEUgsVkGXfzWD+0h0tIMdsk=";
meta = with lib; {
homepage = "https://floriankarsten.github.io/space-grotesk";
description = "";
longDescription = ''
Space Grotesk is a proportional sans-serif typeface variant based on Colophon
Foundry's fixed-width Space Mono family (2016). Originally designed by Florian
Karsten in 2018, Space Grotesk retains the monospace's idiosyncratic details
while optimizing for improved readability at non-display sizes.
'';
license = licenses.ofl;
platforms = platforms.all;
# NOTE TO SELF: package this into nixpkgs
# maintainers = [ ];
};
}

View File

@@ -7,22 +7,25 @@
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/solarized-dark.yaml";
stylix.targets.qt.platform = "kde";
# stylix.fonts = rec {
# monospace = {
# package = pkgs.nerd-fonts.terminess-ttf;
# name = "Terminess NerdFont";
# };
stylix.fonts = rec {
monospace = {
package = pkgs.nerd-fonts.terminess-ttf;
name = "Terminess NerdFont";
};
# serif = monospace;
# sansSerif = monospace;
serif = {
package = pkgs.callPackage ./space-grotesk.nix { };
name = "Space Grotesk";
};
sansSerif = serif;
# emoji = {
# package = pkgs.noto-fonts-emoji;
# name = "Noto Color Emoji";
# };
# sizes = {
# desktop = 10;
# terminal = 10;
# };
# };
emoji = {
package = pkgs.noto-fonts-emoji;
name = "Noto Color Emoji";
};
sizes = {
desktop = 10;
terminal = 10;
};
};
}