summarylogtreecommitdiffstats
path: root/ttf.install
blob: 853f2d845c78e3cbe8d94d6ffc9da4984bc16f86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
_update_font_cache() {
	echo -n "Updating font cache... "
	fc-cache -f > /dev/null
	mkfontscale /usr/share/fonts/TTF
	mkfontdir /usr/share/fonts/TTF
	echo "done."
}

_warn_11838() {
	cat <<EOM
 ***    WARNING: due to cairo developers being lazy*, Unifont may display incorrectly
 ***    in some applications when antialiasing is turned off by fontconfig.
 ***
 ***    * see <https://bugs.freedesktop.org/show_bug.cgi?id=11838>
EOM
}

post_install() {
	ln -fs ../conf.avail/20-unifont-noaa.conf /etc/fonts/conf.d
	ln -fs ../conf.avail/20-unifont-upper.conf /etc/fonts/conf.d
	_update_font_cache
	_warn_11838
}

post_remove() {
	rm -f /etc/fonts/conf.d/20-unifont-noaa.conf
	rm -f /etc/fonts/conf.d/20-unifont-upper.conf
	_update_font_cache
}

post_upgrade() {
	_update_font_cache
	_warn_11838
}