8 When text is rendered by a computer, sometimes characters are
9 displayed as “tofu”. They are little boxes to indicate your device
10 doesn’t have a font to display the text.
11 Google has been developing a font family called Noto, which aims to
12 support all languages with a harmonious look and feel. Noto is
13 Google’s answer to tofu. The name noto is to convey the idea that
14 Google’s goal is to see “no more tofu”. Noto has multiple styles and
15 weights, and freely available to all.
19 stdenvNoCC.mkDerivation rec {
20 pname = "noto-fonts${suffix}";
23 src = fetchFromGitHub {
25 repo = "notofonts.github.io";
26 rev = "noto-monthly-release-${version}";
27 hash = "sha256-bopBRpIGXtRyAjBuMhJCjwFUlK8WDurxIFbZbRzEE40=";
30 _variants = map (variant: builtins.replaceStrings [ " " ] [ "" ] variant) variants;
33 # We check availability in order of variable -> otf -> ttf
34 # unhinted -- the hinted versions use autohint
35 # maintaining maximum coverage.
37 # We have a mix of otf and ttf fonts
38 local out_font=$out/share/fonts/noto
39 '' + (if _variants == [ ] then ''
40 for folder in $(ls -d fonts/*/); do
41 if [[ -d "$folder"unhinted/variable-ttf ]]; then
42 install -m444 -Dt $out_font "$folder"unhinted/variable-ttf/*.ttf
43 elif [[ -d "$folder"unhinted/otf ]]; then
44 install -m444 -Dt $out_font "$folder"unhinted/otf/*.otf
46 install -m444 -Dt $out_font "$folder"unhinted/ttf/*.ttf
50 for variant in $_variants; do
51 if [[ -d fonts/"$variant"/unhinted/variable-ttf ]]; then
52 install -m444 -Dt $out_font fonts/"$variant"/unhinted/variable-ttf/*.ttf
53 elif [[ -d fonts/"$variant"/unhinted/otf ]]; then
54 install -m444 -Dt $out_font fonts/"$variant"/unhinted/otf/*.otf
56 install -m444 -Dt $out_font fonts/"$variant"/unhinted/ttf/*.ttf
61 passthru.updateScript = gitUpdater {
62 rev-prefix = "noto-monthly-release-";
66 description = "Beautiful and free fonts for many languages";
67 homepage = "https://www.google.com/get/noto/";
68 inherit longDescription;
69 license = lib.licenses.ofl;
70 platforms = lib.platforms.all;
71 maintainers = with lib.maintainers; [ mathnerd314 emily jopejoe1 ];