2020-02-10 21:28:49 +00:00
|
|
|
|
{ stdenv
|
|
|
|
|
, stdenvNoCC
|
|
|
|
|
, lib
|
|
|
|
|
, fetchFromGitHub
|
2020-02-29 21:31:47 +00:00
|
|
|
|
, fetchurl
|
2020-02-10 21:28:49 +00:00
|
|
|
|
, fetchzip
|
|
|
|
|
, optipng
|
|
|
|
|
, cairo
|
|
|
|
|
, python3Packages
|
|
|
|
|
, pkgconfig
|
|
|
|
|
, pngquant
|
|
|
|
|
, which
|
|
|
|
|
, imagemagick
|
|
|
|
|
}:
|
2016-03-29 18:00:18 +00:00
|
|
|
|
|
2018-05-28 15:32:16 +00:00
|
|
|
|
let
|
2020-02-10 21:28:49 +00:00
|
|
|
|
mkNoto = { pname, weights }:
|
|
|
|
|
stdenvNoCC.mkDerivation {
|
|
|
|
|
inherit pname;
|
|
|
|
|
version = "2020-01-23";
|
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "googlefonts";
|
|
|
|
|
repo = "noto-fonts";
|
|
|
|
|
rev = "f4726a2ec36169abd02a6d8abe67c8ff0236f6d8";
|
|
|
|
|
sha256 = "0zc1r7zph62qmvzxqfflsprazjf6x1qnwc2ma27kyzh6v36gaykw";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
|
# We copy in reverse preference order -- unhinted first, then
|
|
|
|
|
# hinted -- to get the "best" version of each font while
|
|
|
|
|
# maintaining maximum coverage.
|
|
|
|
|
#
|
|
|
|
|
# TODO: install OpenType, variable versions?
|
|
|
|
|
local out_ttf=$out/share/fonts/truetype/noto
|
|
|
|
|
install -m444 -Dt $out_ttf phaseIII_only/unhinted/ttf/*/*-${weights}.ttf
|
|
|
|
|
install -m444 -Dt $out_ttf phaseIII_only/hinted/ttf/*/*-${weights}.ttf
|
|
|
|
|
install -m444 -Dt $out_ttf unhinted/*/*-${weights}.ttf
|
|
|
|
|
install -m444 -Dt $out_ttf hinted/*/*-${weights}.ttf
|
2018-05-28 15:32:16 +00:00
|
|
|
|
'';
|
2020-02-10 21:28:49 +00:00
|
|
|
|
|
|
|
|
|
meta = with lib; {
|
2018-05-28 15:32:16 +00:00
|
|
|
|
description = "Beautiful and free fonts for many languages";
|
2020-04-01 01:11:51 +00:00
|
|
|
|
homepage = "https://www.google.com/get/noto/";
|
2018-05-28 15:32:16 +00:00
|
|
|
|
longDescription =
|
|
|
|
|
''
|
|
|
|
|
When text is rendered by a computer, sometimes characters are
|
|
|
|
|
displayed as “tofu”. They are little boxes to indicate your device
|
|
|
|
|
doesn’t have a font to display the text.
|
2015-09-19 22:22:20 +00:00
|
|
|
|
|
2018-05-28 15:32:16 +00:00
|
|
|
|
Google has been developing a font family called Noto, which aims to
|
|
|
|
|
support all languages with a harmonious look and feel. Noto is
|
|
|
|
|
Google’s answer to tofu. The name noto is to convey the idea that
|
|
|
|
|
Google’s goal is to see “no more tofu”. Noto has multiple styles and
|
|
|
|
|
weights, and freely available to all.
|
2015-09-19 22:22:20 +00:00
|
|
|
|
|
2018-05-28 15:32:16 +00:00
|
|
|
|
This package also includes the Arimo, Cousine, and Tinos fonts.
|
|
|
|
|
'';
|
2020-02-10 21:28:49 +00:00
|
|
|
|
license = licenses.ofl;
|
2018-05-28 15:32:16 +00:00
|
|
|
|
platforms = platforms.all;
|
2020-02-10 21:28:49 +00:00
|
|
|
|
maintainers = with maintainers; [ mathnerd314 emily ];
|
2018-05-28 15:32:16 +00:00
|
|
|
|
};
|
2015-09-19 22:22:20 +00:00
|
|
|
|
};
|
2018-05-28 15:32:16 +00:00
|
|
|
|
in
|
|
|
|
|
|
2019-08-13 21:52:01 +00:00
|
|
|
|
{
|
2018-05-28 15:32:16 +00:00
|
|
|
|
noto-fonts = mkNoto {
|
2020-02-10 21:28:49 +00:00
|
|
|
|
pname = "noto-fonts";
|
2018-05-28 15:32:16 +00:00
|
|
|
|
weights = "{Regular,Bold,Light,Italic,BoldItalic,LightItalic}";
|
|
|
|
|
};
|
2020-02-10 21:28:49 +00:00
|
|
|
|
|
2018-05-28 15:32:16 +00:00
|
|
|
|
noto-fonts-extra = mkNoto {
|
2020-02-10 21:28:49 +00:00
|
|
|
|
pname = "noto-fonts-extra";
|
2018-05-28 15:32:16 +00:00
|
|
|
|
weights = "{Black,Condensed,Extra,Medium,Semi,Thin}*";
|
2015-09-19 22:22:20 +00:00
|
|
|
|
};
|
2020-02-10 21:28:49 +00:00
|
|
|
|
|
2020-02-10 21:29:28 +00:00
|
|
|
|
noto-fonts-cjk = let zip = fetchzip {
|
|
|
|
|
url = let rev = "be6c059ac1587e556e2412b27f5155c8eb3ddbe6"; in
|
|
|
|
|
"https://raw.githubusercontent.com/googlefonts/noto-cjk/${rev}/NotoSansCJK.ttc.zip";
|
|
|
|
|
# __MACOSX...
|
|
|
|
|
stripRoot = false;
|
|
|
|
|
sha256 = "0ik4z2b15i0pghskgfm3adzb0h35fr4gyzvz3bq49hhkhn9h85vi";
|
|
|
|
|
}; in stdenvNoCC.mkDerivation {
|
|
|
|
|
pname = "noto-fonts-cjk";
|
|
|
|
|
version = "2.001";
|
2015-09-19 22:22:20 +00:00
|
|
|
|
|
2020-02-10 21:29:28 +00:00
|
|
|
|
buildCommand = ''
|
|
|
|
|
install -m444 -Dt $out/share/fonts/opentype/noto-cjk ${zip}/*.ttc
|
2015-09-19 22:22:20 +00:00
|
|
|
|
'';
|
|
|
|
|
|
2020-02-10 21:28:49 +00:00
|
|
|
|
meta = with lib; {
|
2015-09-19 22:22:20 +00:00
|
|
|
|
description = "Beautiful and free fonts for CJK languages";
|
2020-04-01 01:11:51 +00:00
|
|
|
|
homepage = "https://www.google.com/get/noto/help/cjk/";
|
2015-09-19 22:22:20 +00:00
|
|
|
|
longDescription =
|
|
|
|
|
''
|
|
|
|
|
Noto Sans CJK is a sans serif typeface designed as an intermediate style
|
|
|
|
|
between the modern and traditional. It is intended to be a multi-purpose
|
|
|
|
|
digital font for user interface designs, digital content, reading on laptops,
|
|
|
|
|
mobile devices, and electronic books. Noto Sans CJK comprehensively covers
|
|
|
|
|
Simplified Chinese, Traditional Chinese, Japanese, and Korean in a unified font
|
|
|
|
|
family. It supports regional variants of ideographic characters for each of the
|
|
|
|
|
four languages. In addition, it supports Japanese kana, vertical forms, and
|
|
|
|
|
variant characters (itaiji); it supports Korean hangeul — both contemporary and
|
|
|
|
|
archaic.
|
|
|
|
|
'';
|
|
|
|
|
license = licenses.ofl;
|
|
|
|
|
platforms = platforms.all;
|
2020-02-10 21:29:28 +00:00
|
|
|
|
maintainers = with maintainers; [ mathnerd314 emily ];
|
2015-09-19 22:22:20 +00:00
|
|
|
|
};
|
|
|
|
|
};
|
2020-02-10 21:28:49 +00:00
|
|
|
|
|
2019-10-29 09:41:47 +00:00
|
|
|
|
noto-fonts-emoji = let
|
|
|
|
|
version = "unstable-2019-10-22";
|
|
|
|
|
in stdenv.mkDerivation {
|
2019-08-13 21:52:01 +00:00
|
|
|
|
pname = "noto-fonts-emoji";
|
|
|
|
|
inherit version;
|
2015-09-19 22:22:20 +00:00
|
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
|
owner = "googlei18n";
|
|
|
|
|
repo = "noto-emoji";
|
2019-10-29 09:41:47 +00:00
|
|
|
|
rev = "018aa149d622a4fea11f01c61a7207079da301bc";
|
|
|
|
|
sha256 = "0qmnnjpp5lza6g5m3ki6hj46p891h9vl42k3acd0qw8i0jj5yn2c";
|
2015-09-19 22:22:20 +00:00
|
|
|
|
};
|
|
|
|
|
|
2016-03-29 18:05:32 +00:00
|
|
|
|
buildInputs = [ cairo ];
|
2016-03-29 18:00:18 +00:00
|
|
|
|
nativeBuildInputs = [ pngquant optipng which cairo pkgconfig imagemagick ]
|
2019-10-29 09:38:59 +00:00
|
|
|
|
++ (with python3Packages; [ python fonttools nototools ]);
|
2015-09-21 09:27:41 +00:00
|
|
|
|
|
2016-03-29 18:00:18 +00:00
|
|
|
|
postPatch = ''
|
|
|
|
|
sed -i 's,^PNGQUANT :=.*,PNGQUANT := ${pngquant}/bin/pngquant,' Makefile
|
|
|
|
|
patchShebangs flag_glyph_name.py
|
2015-09-21 09:27:41 +00:00
|
|
|
|
'';
|
2015-09-19 22:22:20 +00:00
|
|
|
|
|
2016-03-29 18:00:18 +00:00
|
|
|
|
enableParallelBuilding = true;
|
2015-09-19 22:22:20 +00:00
|
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
|
mkdir -p $out/share/fonts/noto
|
2016-03-29 18:00:18 +00:00
|
|
|
|
cp NotoColorEmoji.ttf fonts/NotoEmoji-Regular.ttf $out/share/fonts/noto
|
2015-09-19 22:22:20 +00:00
|
|
|
|
'';
|
|
|
|
|
|
2020-02-10 21:28:49 +00:00
|
|
|
|
meta = with lib; {
|
2015-09-19 22:22:20 +00:00
|
|
|
|
inherit version;
|
|
|
|
|
description = "Color and Black-and-White emoji fonts";
|
2020-04-01 01:11:51 +00:00
|
|
|
|
homepage = "https://github.com/googlei18n/noto-emoji";
|
2018-11-24 17:23:53 +00:00
|
|
|
|
license = with licenses; [ ofl asl20 ];
|
2015-09-19 22:22:20 +00:00
|
|
|
|
platforms = platforms.all;
|
|
|
|
|
maintainers = with maintainers; [ mathnerd314 ];
|
|
|
|
|
};
|
|
|
|
|
};
|
2020-02-29 21:31:47 +00:00
|
|
|
|
|
|
|
|
|
noto-fonts-emoji-blob-bin = stdenv.mkDerivation rec {
|
|
|
|
|
pname = "noto-fonts-emoji-blob-bin";
|
|
|
|
|
version = "2019-06-14-Emoji-12";
|
|
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
|
url = "https://github.com/C1710/blobmoji/releases/download/v${version}/Blobmoji.ttf";
|
|
|
|
|
sha256 = "0snvymglmvpnfgsriw2cnnqm0f4llav0jvzir6mpd17mqqhhabbh";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
dontUnpack = true;
|
|
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
|
install -D $src $out/share/fonts/blobmoji/Blobmoji.ttf
|
|
|
|
|
'';
|
|
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
|
description = "Noto Emoji with extended Blob support";
|
|
|
|
|
homepage = https://github.com/C1710/blobmoji;
|
|
|
|
|
license = with licenses; [ ofl asl20 ];
|
|
|
|
|
platforms = platforms.all;
|
|
|
|
|
maintainers = with maintainers; [ rileyinman ];
|
|
|
|
|
};
|
|
|
|
|
};
|
2015-09-21 09:27:41 +00:00
|
|
|
|
}
|