123.10. noto-fonts-2.015
Noto Sans and Noto Sans Mono — the desktop's proportional and fixed faces
| Version | 2.015, release 1 |
| Shelf | fonts — Font packages, and font libraries and tooling |
| Phase | 41_system (System), 532 of 1047 in build order |
| Licence | OFL-1.1 |
| Homepage | https://notofonts.github.io/ |
| Build time | 0.2 SBU |
| Installed size | 8.9 MiB in 17 files |
| Recipe | ports/core/fonts/noto-fonts/kpkgbuild |
About
Noto Sans is the system’s default proportional face, and Noto Sans Mono a fixed-width face behind it. The preference file this recipe writes, 56-noto-preferred.conf, puts Noto Sans at the head of fontconfig’s sans-serif and Noto Sans Mono into monospace, so a program that asks for a generic family gets Noto. In monospace, the image’s own 45-kdos-mono.conf runs first and puts JetBrains Mono ahead of it (see ttf-jetbrains-mono); Noto Sans Mono then draws the Latin Extended, Greek and Cyrillic letters JetBrains Mono lacks. Plasma’s interface font, set in kdeglobals, is Noto Sans 10 by name (see Type).
These sources cover Latin, Greek and Cyrillic; noto-fonts-extra and noto-cjk add the other scripts.
Why it is in KDOS
The comment above it in script/phases/41_system/packages.d/fonts.txt:
Noto Sans and Noto Sans Mono, and the preference file that puts them at the head of
sans-serifandmonospace. Anything that asks fontconfig for a generic family gets Noto: every GTK or Qt app, native or boxed, and every Plasma surface whose font is unset. It is installed BESIDE DejaVu and not instead of it: Noto Sans Mono carries the full box and block sets but no diagonal arrows, four dingbats and three misc symbols, and the preference file is numbered so fontconfig reaches DejaVu for those next.
Sources
noto-fonts-2.015.zip(112.0 MiB)
sha2560c34df072a3fa7efbb7cbf34950e1f971a4447cffe365d3a359e2d4089b958f5
upstream: https://github.com/notofonts/latin-greek-cyrillic/releases/download/NotoSans-v2.015/NotoSans-v2.015.zip
archive copy: sources-2/fonts--noto-fonts-2.015.zipnoto-fonts-mono-2.014.zip(30.1 MiB)
sha256090cf6c5e03f337a755630ca888b1fef463e64ae7b33ee134e9309c05f978732
upstream: https://github.com/notofonts/latin-greek-cyrillic/releases/download/NotoSansMono-v2.014/NotoSansMono-v2.014.zip
archive copy: sources-2/fonts--noto-fonts-mono-2.014.zip
Dependencies
Depends on: unzip, fontconfig.
Required by (3): kdos-plasma-look, plasma-integration, stellarium.
Installation
From the repository root, inside the build container, this is the line kdosbuild runs for the port:
script/chroot/exec.sh bash -c 'source script/phases/41_system/phase.env && kpkg install noto-fonts'
What kpkg does
kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/fonts/noto-fonts.
1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.
cd /ports/core/fonts/noto-fonts
echo '0c34df072a3fa7efbb7cbf34950e1f971a4447cffe365d3a359e2d4089b958f5 noto-fonts-2.015.zip' | sha256sum -c -
echo '090cf6c5e03f337a755630ca888b1fef463e64ae7b33ee134e9309c05f978732 noto-fonts-mono-2.014.zip' | sha256sum -c -
2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.
SRC_ROOT=/var/cache/kpkg/work/noto-fonts
SRC=$SRC_ROOT/noto-fonts-2.015
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
cp noto-fonts-2.015.zip "$SRC"
cp noto-fonts-mono-2.014.zip "$SRC"
Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.
3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the recipe’s helpers _mono and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:
unzip -q -o $name-$version.zip -d sans
unzip -q -o $name-mono-$_mono.zip -d mono
install -dm755 $PKG/usr/share/fonts/noto
for f in Regular Italic Medium MediumItalic SemiBold SemiBoldItalic Bold BoldItalic Light LightItalic; do
install -m644 sans/NotoSans/hinted/ttf/NotoSans-$f.ttf \
$PKG/usr/share/fonts/noto/
done
for f in Regular Medium SemiBold Bold Light; do
install -m644 mono/NotoSansMono/hinted/ttf/NotoSansMono-$f.ttf \
$PKG/usr/share/fonts/noto/
done
install -Dm644 sans/OFL.txt $PKG/usr/share/licenses/$name/OFL.txt
install -dm755 $PKG/etc/fonts/conf.d
cat > $PKG/etc/fonts/conf.d/56-noto-preferred.conf <<'XML'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "../fonts.dtd">
<fontconfig>
<alias>
<family>Noto Sans</family>
<default><family>sans-serif</family></default>
</alias>
<alias>
<family>Noto Sans Mono</family>
<default><family>monospace</family></default>
</alias>
<alias>
<family>sans-serif</family>
<prefer><family>Noto Sans</family></prefer>
</alias>
<alias>
<family>monospace</family>
<prefer><family>Noto Sans Mono</family></prefer>
</alias>
</fontconfig>
XML
The common switches of each build system are explained in the Flag glossary.
4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/noto-fonts, prunes what the image does not ship, lints the tree and rolls it reproducibly:
tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
--mtime=@$SOURCE_DATE_EPOCH \
--use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
-cf noto-fonts-2.015-1.tar.xz -C "$PKG" .
5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/noto-fonts, and runs the triggers its paths call for.
Contents
Installed directories: /usr/share/licenses/noto-fonts.
Notes
The two sources are upstream’s release .zip files for Noto Sans and Noto Sans Mono, which are published separately and versioned apart; the Mono release is pinned in the recipe’s _mono helper. kpkg copies a .zip into $SRC without unpacking it, so build.sh unzips each into a directory of its own. Each archive carries several builds of the face (hinted and unhinted TTF, OTF, variable fonts); the recipe installs the hinted TTFs, in the weights its two for loops name.
56-noto-preferred.conf must sort before the 57-dejavu-*.conf files, so that Noto comes ahead of DejaVu in each list. Noto Sans Mono carries the box-drawing and block sets but not the diagonal arrows, some dingbats and a few other symbols, and fontconfig finds those further down the list: in Terminus (TTF) where it has them, otherwise in DejaVu.