# noto-fonts - Google Noto fonts
name=noto-fonts
version=2026.08.01
release=1
desc="Google Noto fonts"
url="https://fonts.google.com/noto"
license="OFL-1.1"
depend=""
makedepend=""
source="https://github.com/notofonts/notofonts.github.io/archive/refs/tags/noto-monthly-release-2026.08.01.tar.gz"
sha256="SKIP"

build() {
	:
}

package() {
	# The upstream tree ships ~8000 TTFs across 200+ script-specific
	# families (2+ GiB) - a full mirror of every regional/historic script
	# variant, not a fallback font stack a desktop actually needs. Install
	# just the general-purpose families every UI toolkit falls back to:
	# Sans/Serif/Mono for Latin/Greek/Cyrillic, plus the symbol and emoji
	# sets glyphs outside that range actually need.
	cd "notofonts.github.io-noto-monthly-release-2026.08.01/fonts"
	install -d "$pkgdir/usr/share/fonts/noto"
	for fam in NotoSans NotoSerif NotoSansMono NotoSansSymbols \
	           NotoSansSymbols2 NotoColorEmoji NotoSansMath; do
		[ -d "$fam" ] || continue
		find "$fam" -iname '*.ttf' | while read -r f; do
			install -Dm644 "$f" "$pkgdir/usr/share/fonts/noto/$(basename "$f")"
		done
	done
}
