# Template file for 'font-atkinson-hyperlegible-ttf'
pkgname=font-atkinson-hyperlegible-ttf
version=2025.02.21
revision=1
_base_rev=1cb311624b2ddf88e9e37873999d165a8cd28b46
_next_rev=7925f50f649b3813257faf2f4c0b381011f434f1
_mono_rev=154d50362016cc3e873eb21d242cd0772384c8f9
depends="font-util xbps-triggers"
short_desc="Typeface with improved readability and legibility - TTF variant"
maintainer="classabbyamp <void@placeviolette.net>"
license="OFL-1.1"
homepage="https://brailleinstitute.org/freefont"
distfiles="https://github.com/googlefonts/atkinson-hyperlegible/archive/${_base_rev}.tar.gz
 https://github.com/googlefonts/atkinson-hyperlegible-next/archive/${_next_rev}.tar.gz
 https://github.com/googlefonts/atkinson-hyperlegible-next-mono/archive/${_mono_rev}.tar.gz"
checksum="d761a7dd4f020d883a90cebda3258618159230523a19a16ed8b94ab0b0d17dae
 4b455dcf5ce2d6261df7caf6f4d035c893b446f14269106a07bc03c204368626
 d8b50ca876781ef6c2f0e1dd1a7ed6896a7f7769242e76be901b98c6d7edfafb"
font_dirs="/usr/share/fonts/TTF/atkinson-hyperlegible"
provides="font:sans-serif-0_1 font:monospace-0_1"

do_install() {
	for fmt in ttf otf woff2; do
		while read -r f; do
			vinstall "$f" 0644 usr/share/fonts/${fmt^^}/atkinson-hyperlegible
		done < <(find . -name "*.${fmt}")
	done
}

font-atkinson-hyperlegible-otf_package() {
	font_dirs="/usr/share/fonts/OTF/atkinson-hyperlegible"
	short_desc="${short_desc/TTF/OTF}"
	pkg_install() {
		vmove $font_dirs
	}
}

font-atkinson-hyperlegible-web_package() {
	font_dirs="/usr/share/fonts/WOFF2/atkinson-hyperlegible"
	short_desc="${short_desc/TTF/WOFF}"
	pkg_install() {
		vmove $font_dirs
	}
}
