From 6313eab53294a1d489d5de86f4fc4a3ec841d23a Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Sat, 18 Mar 2023 16:15:04 -0400 Subject: [PATCH] initial commit Signed-off-by: Xe Iaso --- .gitignore | 2 + flake.lock | 42 +++++++++++++ flake.nix | 176 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 220 insertions(+) create mode 100644 .gitignore create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..726d2d6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +result +.direnv diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..6c94e4c --- /dev/null +++ b/flake.lock @@ -0,0 +1,42 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1678898370, + "narHash": "sha256-xTICr1j+uat5hk9FyuPOFGxpWHdJRibwZC+ATi0RbtE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ac718d02867a84b42522a0ece52d841188208f2c", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs", + "utils": "utils" + } + }, + "utils": { + "locked": { + "lastModified": 1678901627, + "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..09e5130 --- /dev/null +++ b/flake.nix @@ -0,0 +1,176 @@ +{ + description = "Iosevka Iaso fonts"; + + inputs = { + nixpkgs.url = "nixpkgs/nixos-unstable"; + utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, utils }: + utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system: + let pkgs = import nixpkgs { + inherit system; + }; + in { + packages.default = pkgs.stdenvNoCC.mkDerivation { + name = "iosevka-iaso"; + dontUnpack = true; + buildPhase = + let + metric-override = { + cap = 790; + ascender = 790; + xHeight = 570; + }; + iosevka-term = pkgs.iosevka.override { + set = "curly"; + privateBuildPlan = { + family = "Iosevka Term Iaso"; + spacing = "term"; + serifs = "sans"; + no-ligation = false; + ligations = { + "inherit" = "default-calt"; + }; + no-cv-ss = true; + variants = { + inherits = "ss01"; + design = { + tilde = "low"; + number-sign = "slanted-tall"; + at = "fourfold-solid-inner-tall"; + }; + }; + slopes.upright = { + angle = 0; + shape = "upright"; + menu = "upright"; + css = "normal"; + }; + weights.regular = { + shape = 400; + menu = 400; + css = 400; + }; + widths.normal = { + shape = 600; + menu = 7; + css = "expanded"; + }; + inherit metric-override; + }; + }; + iosevka-aile = pkgs.iosevka.override { + set = "aile"; + privateBuildPlan = { + family = "Iosevka Aile Iaso"; + spacing = "quasi-proportional-extension-only"; + no-ligation = true; + no-cv-ss = true; + variants = { + inherits = "ss01"; + design = { + tilde = "low"; + number-sign = "slanted-tall"; + at = "fourfold-solid-inner-tall"; + }; + }; + slopes = { + upright = { + angle = 0; + shape = "upright"; + menu = "upright"; + css = "normal"; + }; + italic = { + angle = 9.4; + shape = "italic"; + menu = "italic"; + css = "italic"; + }; + }; + weights.regular = { + shape = 400; + menu = 400; + css = 400; + }; + widths.normal = { + shape = 550; + menu = 7; + css = "expanded"; + }; + inherit metric-override; + }; + }; + iosevka-etoile = pkgs.iosevka.override { + set = "etoile"; + privateBuildPlan = { + family = "Iosevka Etoile Iaso"; + spacing = "quasi-proportional"; + serifs = "slab"; + no-ligation = true; + no-cv-ss = true; + variants = { + inherits = "ss01"; + design = { + capital-w = "straight-flat-top"; + f = "flat-hook-serifed"; + j = "flat-hook-serifed"; + t = "flat-hook"; + capital-t = "serifed"; # not part of original Iosevka Aile + w = "straight-flat-top"; + #capital-g = "toothless-rounded-serifless-hooked"; + r = "corner-hooked"; + + tilde = "low"; + number-sign = "slanted-tall"; + at = "fourfold-solid-inner-tall"; + }; + italic = { + f = "flat-hook-tailed"; + }; + }; + slopes = { + upright = { + angle = 0; + shape = "upright"; + menu = "upright"; + css = "normal"; + }; + italic = { + angle = 9.4; + shape = "italic"; + menu = "italic"; + css = "italic"; + }; + }; + weights.regular = { + shape = 400; + menu = 400; + css = 400; + }; + widths.normal = { + shape = 600; + menu = 7; + css = "expanded"; + }; + inherit metric-override; + }; + }; + in + '' + mkdir -p ttf + for ttf in ${iosevka-term}/share/fonts/truetype/*.ttf ${iosevka-aile}/share/fonts/truetype/*.ttf ${iosevka-etoile}/share/fonts/truetype/*.ttf; do + cp $ttf . + ${pkgs.woff2}/bin/woff2_compress *.ttf + mv *.ttf ttf + done + ''; + installPhase = '' + mkdir -p $out + cp *.woff2 $out + cp ttf/*.ttf $out + ''; + }; + }); +}