Compare commits
2 commits
2374bc2ad6
...
0001be8096
Author | SHA1 | Date | |
---|---|---|---|
Artemis Tosini | 0001be8096 | ||
Artemis Tosini | e8f9a41e35 |
BIN
P22-Underground/P22UndergroundCY-Heavy.ttf
Normal file
BIN
P22-Underground/P22UndergroundCY-Heavy.ttf
Normal file
Binary file not shown.
BIN
P22-Underground/P22UndergroundCYBook.ttf
Normal file
BIN
P22-Underground/P22UndergroundCYBook.ttf
Normal file
Binary file not shown.
BIN
P22-Underground/P22UndergroundCYBookPCp.ttf
Normal file
BIN
P22-Underground/P22UndergroundCYBookPCp.ttf
Normal file
Binary file not shown.
BIN
P22-Underground/P22UndergroundCYBookSC.ttf
Normal file
BIN
P22-Underground/P22UndergroundCYBookSC.ttf
Normal file
Binary file not shown.
BIN
P22-Underground/P22UndergroundCYDemiBold.ttf
Normal file
BIN
P22-Underground/P22UndergroundCYDemiBold.ttf
Normal file
Binary file not shown.
BIN
P22-Underground/P22UndergroundCYDemiPCp.ttf
Normal file
BIN
P22-Underground/P22UndergroundCYDemiPCp.ttf
Normal file
Binary file not shown.
BIN
P22-Underground/P22UndergroundCYDemiSC.ttf
Normal file
BIN
P22-Underground/P22UndergroundCYDemiSC.ttf
Normal file
Binary file not shown.
BIN
P22-Underground/P22UndergroundCYHeavyPC.ttf
Normal file
BIN
P22-Underground/P22UndergroundCYHeavyPC.ttf
Normal file
Binary file not shown.
BIN
P22-Underground/P22UndergroundCYHeavySC.ttf
Normal file
BIN
P22-Underground/P22UndergroundCYHeavySC.ttf
Normal file
Binary file not shown.
BIN
P22-Underground/P22UndergroundCYLight.ttf
Normal file
BIN
P22-Underground/P22UndergroundCYLight.ttf
Normal file
Binary file not shown.
BIN
P22-Underground/P22UndergroundCYLightPCp.ttf
Normal file
BIN
P22-Underground/P22UndergroundCYLightPCp.ttf
Normal file
Binary file not shown.
BIN
P22-Underground/P22UndergroundCYLightSC.ttf
Normal file
BIN
P22-Underground/P22UndergroundCYLightSC.ttf
Normal file
Binary file not shown.
BIN
P22-Underground/P22UndergroundCYMedPCp.ttf
Normal file
BIN
P22-Underground/P22UndergroundCYMedPCp.ttf
Normal file
Binary file not shown.
BIN
P22-Underground/P22UndergroundCYMedSC.ttf
Normal file
BIN
P22-Underground/P22UndergroundCYMedSC.ttf
Normal file
Binary file not shown.
BIN
P22-Underground/P22UndergroundCYMedium.ttf
Normal file
BIN
P22-Underground/P22UndergroundCYMedium.ttf
Normal file
Binary file not shown.
BIN
P22-Underground/P22UndergroundCYProBook.ttf
Normal file
BIN
P22-Underground/P22UndergroundCYProBook.ttf
Normal file
Binary file not shown.
BIN
P22-Underground/P22UndergroundCYProDemi.ttf
Normal file
BIN
P22-Underground/P22UndergroundCYProDemi.ttf
Normal file
Binary file not shown.
BIN
P22-Underground/P22UndergroundCYProHeavy.ttf
Normal file
BIN
P22-Underground/P22UndergroundCYProHeavy.ttf
Normal file
Binary file not shown.
BIN
P22-Underground/P22UndergroundCYProLight.ttf
Normal file
BIN
P22-Underground/P22UndergroundCYProLight.ttf
Normal file
Binary file not shown.
BIN
P22-Underground/P22UndergroundCYProMedium.ttf
Normal file
BIN
P22-Underground/P22UndergroundCYProMedium.ttf
Normal file
Binary file not shown.
BIN
P22-Underground/P22UndergroundCYProThin.ttf
Normal file
BIN
P22-Underground/P22UndergroundCYProThin.ttf
Normal file
Binary file not shown.
BIN
P22-Underground/P22UndergroundCYThin.ttf
Normal file
BIN
P22-Underground/P22UndergroundCYThin.ttf
Normal file
Binary file not shown.
BIN
P22-Underground/P22UndergroundCYThinPCp.ttf
Normal file
BIN
P22-Underground/P22UndergroundCYThinPCp.ttf
Normal file
Binary file not shown.
BIN
P22-Underground/P22UndergroundCYThinSC.ttf
Normal file
BIN
P22-Underground/P22UndergroundCYThinSC.ttf
Normal file
Binary file not shown.
29
flake.nix
29
flake.nix
|
@ -22,8 +22,13 @@
|
|||
sLen = stringLength str;
|
||||
in sufLen <= sLen && suffix == substring (sLen - sufLen) sufLen str;
|
||||
|
||||
buildFont = { name, files, license, author, }:
|
||||
buildFont = { name, files ? [ ], dir ? null, license, author }:
|
||||
let
|
||||
types = {
|
||||
ttf = "truetype";
|
||||
otf = "opentype";
|
||||
};
|
||||
|
||||
copyType = extension: pathName:
|
||||
let
|
||||
filteredFiles = filter (pathEndsWith ("." + extension)) files;
|
||||
|
@ -34,14 +39,19 @@
|
|||
'') + concatStringsSep "\n" (map (file:
|
||||
"cp -v ${file} $out/share/fonts/${pathName}/${filename file}")
|
||||
filteredFiles);
|
||||
|
||||
copyTypeDir = extension: pathName: ''
|
||||
if [ -n "$(shopt -s nullglob; echo ${dir}/*.${extension})" ]; then
|
||||
mkdir -p $out/share/fonts/${pathName}
|
||||
cp -v -t $out/share/fonts/${pathName} ${dir}/*.${extension}
|
||||
fi
|
||||
'';
|
||||
in pkgs.stdenvNoCC.mkDerivation {
|
||||
inherit name;
|
||||
|
||||
dontUnpack = true;
|
||||
installPhase = ''
|
||||
${copyType "ttf" "truetype"}
|
||||
${copyType "otf" "opentype"}
|
||||
'';
|
||||
installPhase = mapAttrsToList copyType types
|
||||
++ optional (dir != null) (mapAttrsToList copyTypeDir types);
|
||||
|
||||
meta = {
|
||||
inherit license;
|
||||
|
@ -59,11 +69,16 @@
|
|||
}
|
||||
{
|
||||
name = "gg sans";
|
||||
files =
|
||||
[ ./ggsans/ggsans-Normal.ttf ./ggsans/ggsans-Medium.ttf ./ggsans/ggsans-SemiBold.ttf ];
|
||||
dir = ./ggsans;
|
||||
license = licenses.unfree;
|
||||
author = "Colophon Foundry";
|
||||
}
|
||||
{
|
||||
name = "P22 Underground";
|
||||
dir = ./P22-Underground;
|
||||
license = licenses.unfree;
|
||||
author = "P22 Type Foundry";
|
||||
}
|
||||
{
|
||||
name = "Caveat";
|
||||
files = [ ./Caveat.ttf ];
|
||||
|
|
Loading…
Reference in a new issue