From 3e9db5f09d15753549a5cacfeb19040ee6d4e468 Mon Sep 17 00:00:00 2001 From: Denis Knauf Date: Wed, 19 Jul 2023 21:00:30 +0200 Subject: [PATCH] pname consequently doener-cased. Source Code Pro, Source Sans, Source Serif and Wiener Norm added. --- fonts.nix | 56 +++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 48 insertions(+), 8 deletions(-) diff --git a/fonts.nix b/fonts.nix index 5e61adc..1b57b33 100644 --- a/fonts.nix +++ b/fonts.nix @@ -17,12 +17,12 @@ let }; fira_code = fetchfont rec { - pname = "FiraCode"; version = "6.2"; + pname = "Fira-Code"; version = "6.2"; src = fetchurl { name = "${pname}-${version}.zip"; hash = "sha256-CUmRW6jrJNif2T0Qp/9iP0KDDXxf/D7L+WDk7K0+Pnk="; url = github "tonsky/FiraCode/releases/download/${version}/Fira_Code_v${version}.zip"; }; }; fira_mono = fetchfont rec { - pname = "FiraMono"; version = "4.202"; + pname = "Fira-Mono"; version = "4.202"; src = fetchurl { name = "${pname}-${version}.tar.gz"; hash = "sha256-2GJpZXOH8UTXe6EgERJPMPQj9wZy4VdtwW+Ri7Ft3+Q="; url = github "mozilla/Fira/archive/refs/tags/${version}.tar.gz"; }; }; inconsolata = @@ -37,23 +37,63 @@ let }; libre_barcode = fetchfont rec { - pname = "LibreBarcode"; version = "1.008"; - src = fetchurl { name = "${pname}-${version}.zip"; hash = "sha256-47ntjMcZR4j5ybGU2UAA5t4FTPvyAvTiDSKYGEdRDQU="; url = github "graphicore/librebarcode/releases/download/v${version}/${pname}_v${version}.zip"; }; + pname = "Libre-Barcode"; version = "1.008"; + src = fetchurl { name = "${pname}-${version}.zip"; hash = "sha256-47ntjMcZR4j5ybGU2UAA5t4FTPvyAvTiDSKYGEdRDQU="; url = github "graphicore/librebarcode/releases/download/v${version}/LibreBarcode_v${version}.zip"; }; }; oswald = fetchfont rec { pname = "Oswald"; version = "4.004"; src = fetchurl { name = "${pname}-${version}.tar.gz"; hash = "sha256-XWiMR+0KU76RE7bP4q2urQGYpryqLJayXAEzrT1Gk2Y="; url = googlefonts "OswaldFont/archive/65c0044bd1e113993d193529361f02fa4fd7ad94.tar.gz"; }; }; + source-code-pro = + fetchfont rec { + pname = "Source-Code-Pro"; version = "2.042"; + srcs = + let baseurl = github "adobe-fonts/source-code-pro/releases/download/2.042R-u%2F1.062R-i%2F1.026R-vf"; + in [ + (fetchurl { name = "${pname}-${version}-otf.zip"; hash = "sha256-dUouPruUWukF1yCsWJazs0rMlUbdZVHvlTaGl4hina4="; url = "${baseurl}/OTF-source-code-pro-2.042R-u_1.062R-i.zip"; }) + # Totaly useless .woff/.woff2 files, because they convert .otf to .otf.woff and .ttf to .ttf.woff. So better to generate them self. + #(fetchurl { name = "${pname}-${version}-woff.zip"; hash = "sha256-6pXBFpB7OgLb6QPbWsMuTbrNGD3Vj/S1oXUxLG3a8oo="; url = "${baseurl}/WOFF-source-code-pro-2.042R-u_1.062R-i_1.026Rvf.zip"; }) + #(fetchurl { name = "${pname}-${version}-woff2.zip"; hash = "sha256-IYTB8rrEj099lSsBR9wOSAaf0ftKjDG4abcI78l402U="; url = "${baseurl}/WOFF2-source-code-pro-2.042R-u_1.062R-i_1.026Rvf.zip"; }) + (fetchurl { name = "${pname}-${version}-vf.zip"; hash = "sha256-BmC6DNFHj5LPzyrXkLeqKfitstrxVZj0UqZa5hycn7E="; url = "${baseurl}/VF-source-code-VF-1.026R.zip"; }) + ]; + }; + source-serif = + fetchfont rec { + pname = "Source-Serif"; version = "4.005"; + srcs = + let baseurl = github "adobe-fonts/source-serif/releases/download/${version}R/"; + in [ + (fetchurl { name = "${pname}-${version}.zip"; hash = "sha256-VJ/bj5poK9BpRCmGIUBJafbed8LkIv87gkSh3NagxCU="; url = "${baseurl}/source-serif-${version}_Desktop.zip"; }) + # Totaly useless .woff/.woff2 files, because they convert .otf to .otf.woff and .ttf to .ttf.woff. So better to generate them self. + #(fetchurl { name = "${pname}-${version}-woff.zip"; hash = "sha256-aHJU28beIClQaphvN7l+oxGUnf+pHIlAXPDueL8XqOA="; url = "${baseurl}/source-serif-${version}_WOFF.zip"; }) + #(fetchurl { name = "${pname}-${version}-woff2.zip"; hash = "sha256-rxDoDc0ilnSLBMuZF9ufe6CuZRARZf0vDBa5gS2avSg="; url = "${baseurl}/source-serif-${version}_WOFF2.zip"; }) + ]; + }; + source-sans = + fetchfont rec { + pname = "Source-Sans"; version = "3.052"; + srcs = + let baseurl = github "adobe-fonts/source-sans/releases/download/${version}R/"; + in [ + (fetchurl { name = "${pname}-${version}.zip"; hash = "sha256-pOu96iCwjMvXvzZlqUYkVO790B2aYwcSnTs9RnKYEHQ="; url = "${baseurl}/OTF-source-sans-3.052R.zip"; }) + (fetchurl { name = "${pname}-${version}-vf.zip"; hash = "sha256-2OKsNV4G5qDw4KCxrAwkUa+nB1hNe7nWsR755LdJkEw="; url = "${baseurl}/VF-source-sans-3.052R.zip"; }) + ]; + }; rubik_dirt = fetchfont rec { - pname = "RubikDirt"; version = "2"; + pname = "Rubik-Dirt"; version = "2"; srcs = let baseurl = github "NaN-xyz/Rubik-Filtered/raw/7f47b7f79f903e1d6af9883da43a84928e02b816/dirt/fonts"; in [ - (fetchurl { name = "${pname}-Regular.ttf"; hash = "sha256-nePZKOQ0pH7IXXWQEsig6/6rCGAHbupOOYmkfF4hMSM="; url = "${baseurl}/ttf/${pname}-Regular.ttf"; }) - (fetchurl { name = "${pname}-Regular.woff2"; hash = "sha256-xh1jUaN5FRaU/omXT7U9T9Qhu+Cl/YddAJnSpgCOqYk="; url = "${baseurl}/webfonts/${pname}-Regular.woff2"; }) - ]; + (fetchurl { name = "${pname}-Regular.ttf"; hash = "sha256-nePZKOQ0pH7IXXWQEsig6/6rCGAHbupOOYmkfF4hMSM="; url = "${baseurl}/ttf/RubikDirt-Regular.ttf"; }) + (fetchurl { name = "${pname}-Regular.woff2"; hash = "sha256-xh1jUaN5FRaU/omXT7U9T9Qhu+Cl/YddAJnSpgCOqYk="; url = "${baseurl}/webfonts/RubikDirt-Regular.woff2"; }) + ]; + }; + wiener-norm = + fetchfont rec { + pname = "Wiener-Norm"; version = "1"; + src = fetchurl { name = "wiener-norm.zip"; hash = "sha256-dvHTRIYGURNx+1NMX4ts0xlb/GgRguWFIC0NMiESjvc="; url = "http://www.horaczek.net/download/wiener_norm.zip"; }; }; }; in {