add CSS better

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso
2023-03-18 16:53:45 -04:00
parent f376658e99
commit 805945ed59

306
flake.nix
View File

@@ -8,171 +8,163 @@
outputs = { self, nixpkgs, utils }: outputs = { self, nixpkgs, utils }:
utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system: utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system:
let pkgs = import nixpkgs { let pkgs = import nixpkgs { inherit system; };
inherit system;
};
in { in {
packages.default = pkgs.stdenvNoCC.mkDerivation { packages.default = pkgs.stdenvNoCC.mkDerivation {
name = "iosevka-iaso"; name = "iosevka-iaso";
dontUnpack = true; dontUnpack = true;
buildPhase = buildPhase = let
let metric-override = {
metric-override = { cap = 790;
cap = 790; ascender = 790;
ascender = 790; xHeight = 570;
xHeight = 570; };
}; iosevka-curly = pkgs.iosevka.override {
iosevka-curly = pkgs.iosevka.override { set = "curly";
set = "curly"; privateBuildPlan = {
privateBuildPlan = { family = "Iosevka Curly Iaso";
family = "Iosevka Curly Iaso"; spacing = "term";
spacing = "term"; serifs = "sans";
serifs = "sans"; no-ligation = false;
no-ligation = false; ligations = { "inherit" = "default-calt"; };
ligations = { no-cv-ss = true;
"inherit" = "default-calt"; variants = {
}; inherits = "ss01";
no-cv-ss = true; design = {
variants = { tilde = "low";
inherits = "ss01"; number-sign = "slanted-tall";
design = { at = "fourfold-solid-inner-tall";
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 { slopes.upright = {
set = "aile"; angle = 0;
privateBuildPlan = { shape = "upright";
family = "Iosevka Aile Iaso"; menu = "upright";
spacing = "quasi-proportional-extension-only"; css = "normal";
no-ligation = true; };
no-cv-ss = true; weights.regular = {
variants = { shape = 400;
inherits = "ss01"; menu = 400;
design = { css = 400;
tilde = "low"; };
number-sign = "slanted-tall"; widths.normal = {
at = "fourfold-solid-inner-tall"; shape = 600;
}; menu = 7;
}; css = "expanded";
slopes = { };
upright = { inherit metric-override;
angle = 0; };
shape = "upright"; };
menu = "upright"; iosevka-aile = pkgs.iosevka.override {
css = "normal"; set = "aile";
}; privateBuildPlan = {
italic = { family = "Iosevka Aile Iaso";
angle = 9.4; spacing = "quasi-proportional-extension-only";
shape = "italic"; no-ligation = true;
menu = "italic"; no-cv-ss = true;
css = "italic"; variants = {
}; inherits = "ss01";
}; design = {
weights.regular = { tilde = "low";
shape = 400; number-sign = "slanted-tall";
menu = 400; at = "fourfold-solid-inner-tall";
css = 400;
};
widths.normal = {
shape = 550;
menu = 7;
css = "expanded";
};
inherit metric-override;
}; };
}; };
iosevka-etoile = pkgs.iosevka.override { slopes = {
set = "etoile"; upright = {
privateBuildPlan = { angle = 0;
family = "Iosevka Etoile Iaso"; shape = "upright";
spacing = "quasi-proportional"; menu = "upright";
serifs = "slab"; css = "normal";
no-ligation = true; };
no-cv-ss = true; italic = {
variants = { angle = 9.4;
inherits = "ss01"; shape = "italic";
design = { menu = "italic";
capital-w = "straight-flat-top"; css = "italic";
f = "flat-hook-serifed"; };
j = "flat-hook-serifed"; };
t = "flat-hook"; weights.regular = {
capital-t = "serifed"; # not part of original Iosevka Aile shape = 400;
w = "straight-flat-top"; menu = 400;
#capital-g = "toothless-rounded-serifless-hooked"; css = 400;
r = "corner-hooked"; };
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"; tilde = "low";
number-sign = "slanted-tall"; number-sign = "slanted-tall";
at = "fourfold-solid-inner-tall"; at = "fourfold-solid-inner-tall";
}; };
italic = { italic = { f = "flat-hook-tailed"; };
f = "flat-hook-tailed"; };
}; slopes = {
}; upright = {
slopes = { angle = 0;
upright = { shape = "upright";
angle = 0; menu = "upright";
shape = "upright"; css = "normal";
menu = "upright"; };
css = "normal"; italic = {
}; angle = 9.4;
italic = { shape = "italic";
angle = 9.4; menu = "italic";
shape = "italic"; css = "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 weights.regular = {
'' shape = 400;
mkdir -p ttf menu = 400;
for ttf in ${iosevka-curly}/share/fonts/truetype/*.ttf ${iosevka-aile}/share/fonts/truetype/*.ttf ${iosevka-etoile}/share/fonts/truetype/*.ttf; do css = 400;
cp $ttf . };
${pkgs.woff2}/bin/woff2_compress *.ttf widths.normal = {
mv *.ttf ttf shape = 600;
done menu = 7;
''; css = "expanded";
installPhase = '' };
mkdir -p $out inherit metric-override;
cp *.woff2 $out };
cp ttf/*.ttf $out };
in ''
mkdir -p ttf
for ttf in ${iosevka-curly}/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
cp ${src/family.css} $out cp ${src/family.css} $out/family.css
''; '';
}; };
}); });
} }