diff options
author | midchildan <git@midchildan.org> | 2021-11-14 00:45:50 +0900 |
---|---|---|
committer | midchildan <git@midchildan.org> | 2022-01-17 02:04:02 +0900 |
commit | bd8132ac625ddd87fda0bb43f493608e6654c508 (patch) | |
tree | db3645788171af1c5c78e90dd73636952b4a1483 /pkgs/data/fonts/noto-fonts/default.nix | |
parent | f9dcc5dc021b3152b2715930b1e86aadc7cf78d7 (diff) | |
download | nixpkgs-bd8132ac625ddd87fda0bb43f493608e6654c508.tar nixpkgs-bd8132ac625ddd87fda0bb43f493608e6654c508.tar.gz nixpkgs-bd8132ac625ddd87fda0bb43f493608e6654c508.tar.bz2 nixpkgs-bd8132ac625ddd87fda0bb43f493608e6654c508.tar.lz nixpkgs-bd8132ac625ddd87fda0bb43f493608e6654c508.tar.xz nixpkgs-bd8132ac625ddd87fda0bb43f493608e6654c508.tar.zst nixpkgs-bd8132ac625ddd87fda0bb43f493608e6654c508.zip |
noto-fonts-cjk: add missing serif font
Fixes #99940
Diffstat (limited to 'pkgs/data/fonts/noto-fonts/default.nix')
-rw-r--r-- | pkgs/data/fonts/noto-fonts/default.nix | 80 |
1 files changed, 47 insertions, 33 deletions
diff --git a/pkgs/data/fonts/noto-fonts/default.nix b/pkgs/data/fonts/noto-fonts/default.nix index d6b4488daf0..11f911aeb47 100644 --- a/pkgs/data/fonts/noto-fonts/default.nix +++ b/pkgs/data/fonts/noto-fonts/default.nix @@ -3,7 +3,6 @@ , lib , fetchFromGitHub , fetchurl -, fetchzip , cairo , python3 , pkg-config @@ -61,6 +60,42 @@ let maintainers = with maintainers; [ mathnerd314 emily ]; }; }; + + mkNotoCJK = { typeface, version, rev, sha256 }: + stdenvNoCC.mkDerivation { + pname = "noto-fonts-cjk-${lib.toLower typeface}"; + inherit version; + + src = fetchFromGitHub { + owner = "googlefonts"; + repo = "noto-cjk"; + inherit rev sha256; + }; + + installPhase = '' + install -m444 -Dt $out/share/fonts/opentype/noto-cjk ${typeface}/Variable/OTC/*.otf.ttc + ''; + + meta = with lib; { + description = "Beautiful and free fonts for CJK languages"; + homepage = "https://www.google.com/get/noto/help/cjk/"; + longDescription = '' + Noto ${typeface} CJK is a ${lib.toLower typeface} 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 ${typeface} 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; + maintainers = with maintainers; [ mathnerd314 emily ]; + }; + }; in { @@ -74,39 +109,18 @@ in weights = "{Black,Condensed,Extra,Medium,Semi,Thin}*"; }; - 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"; - - buildCommand = '' - install -m444 -Dt $out/share/fonts/opentype/noto-cjk ${zip}/*.ttc - ''; + noto-fonts-cjk-sans = mkNotoCJK { + typeface = "Sans"; + version = "2.004"; + rev = "9f7f3c38eab63e1d1fddd8d50937fe4f1eacdb1d"; + sha256 = "sha256-BX4tcDcz+RGka8mtced1k3BopUJQ14t1BtAVqTjyPik="; + }; - meta = with lib; { - description = "Beautiful and free fonts for CJK languages"; - homepage = "https://www.google.com/get/noto/help/cjk/"; - 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; - maintainers = with maintainers; [ mathnerd314 emily ]; - }; + noto-fonts-cjk-serif = mkNotoCJK { + typeface = "Serif"; + version = "2.000"; + rev = "9f7f3c38eab63e1d1fddd8d50937fe4f1eacdb1d"; + sha256 = "sha256-BX4tcDcz+RGka8mtced1k3BopUJQ14t1BtAVqTjyPik="; }; noto-fonts-emoji = let |