Source Serif: Prepare any files (.woff, .woff2), instead using downloaded (.ttf.woff and .otf.woff).

This commit is contained in:
Denis Knauf 2023-07-19 22:50:37 +02:00
parent 3e9db5f09d
commit 124748705f

View file

@ -58,18 +58,6 @@ let
(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";
@ -80,6 +68,28 @@ let
(fetchurl { name = "${pname}-${version}-vf.zip"; hash = "sha256-2OKsNV4G5qDw4KCxrAwkUa+nB1hNe7nWsR755LdJkEw="; url = "${baseurl}/VF-source-sans-3.052R.zip"; })
];
};
source-serif =
fetchfont rec {
pname = "Source-Serif"; version = "4.005";
src = stdenv.mkDerivation {
pname = "Source-Serif"; version = "4.005";
nativeBuildInputs = [ coreutils ];
src = fetchzip { stripRoot=false; name = "${pname}-${version}.zip"; hash = "sha256-JVt+uJED/M2S2RBOXZ1th+aPLOuCNTl9jx6dC5cyMlQ="; url = github "adobe-fonts/source-serif/releases/download/${version}R/source-serif-${version}_Desktop.zip"; };
installPhase = ''
mkdir -p "$out/"
echo "================ src=$src"
find $src -name \*.otf -print -exec cp -a \{\} "$out/" \;
'';
};
#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"; })
# ];
};
rubik_dirt =
fetchfont rec {
pname = "Rubik-Dirt"; version = "2";