10 When text is rendered by a computer, sometimes characters are
11 displayed as “tofu”. They are little boxes to indicate your device
12 doesn’t have a font to display the text.
13 Google has been developing a font family called Noto, which aims to
14 support all languages with a harmonious look and feel. Noto is
15 Google’s answer to tofu. The name noto is to convey the idea that
16 Google’s goal is to see “no more tofu”. Noto has multiple styles and
17 weights, and freely available to all.
21 stdenvNoCC.mkDerivation rec {
22 pname = "noto-fonts${suffix}";
23 version = "2024.12.01";
25 src = fetchFromGitHub {
27 repo = "notofonts.github.io";
28 rev = "noto-monthly-release-${version}";
29 hash = "sha256-CmYGnQOSABTMir120VWtROiLcEBVj117ZpgwPijoWnI=";
32 _variants = map (variant: builtins.replaceStrings [ " " ] [ "" ] variant) variants;
36 # We check availability in order of variable -> otf -> ttf
37 # unhinted -- the hinted versions use autohint
38 # maintaining maximum coverage.
40 # We have a mix of otf and ttf fonts
41 local out_font=$out/share/fonts/noto
44 if _variants == [ ] then
46 for folder in $(ls -d fonts/*/); do
47 if [[ -d "$folder"unhinted/variable-ttf ]]; then
48 install -m444 -Dt $out_font "$folder"unhinted/variable-ttf/*.ttf
49 elif [[ -d "$folder"unhinted/otf ]]; then
50 install -m444 -Dt $out_font "$folder"unhinted/otf/*.otf
52 install -m444 -Dt $out_font "$folder"unhinted/ttf/*.ttf
58 for variant in $_variants; do
59 if [[ -d fonts/"$variant"/unhinted/variable-ttf ]]; then
60 install -m444 -Dt $out_font fonts/"$variant"/unhinted/variable-ttf/*.ttf
61 elif [[ -d fonts/"$variant"/unhinted/otf ]]; then
62 install -m444 -Dt $out_font fonts/"$variant"/unhinted/otf/*.otf
64 install -m444 -Dt $out_font fonts/"$variant"/unhinted/ttf/*.ttf
70 passthru.updateScript = gitUpdater {
71 rev-prefix = "noto-monthly-release-";
74 passthru.tests = { inherit (nixosTests) noto-fonts; };
77 description = "Beautiful and free fonts for many languages";
78 homepage = "https://www.google.com/get/noto/";
79 inherit longDescription;
80 license = lib.licenses.ofl;
81 platforms = lib.platforms.all;
82 maintainers = with lib.maintainers; [