initial commit

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso
2023-03-18 16:15:04 -04:00
commit 6313eab532
3 changed files with 220 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
result
.direnv

42
flake.lock generated Normal file
View File

@@ -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
}

176
flake.nix Normal file
View File

@@ -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
'';
};
});
}