summarylogtreecommitdiffstats
path: root/ttf.install
diff options
context:
space:
mode:
authorfelix2015-06-08 14:44:44 +0200
committerfelix2015-06-08 15:05:30 +0200
commit102f7cde6f3aab6bdf50a77964f247fbb87c38c6 (patch)
tree58abf3efddddf1e54466feb6b5ca1087ddeb1f2c /ttf.install
downloadaur-102f7cde6f3aab6bdf50a77964f247fbb87c38c6.tar.gz
Initial import
Diffstat (limited to 'ttf.install')
-rw-r--r--ttf.install34
1 files changed, 34 insertions, 0 deletions
diff --git a/ttf.install b/ttf.install
new file mode 100644
index 000000000000..eda6636619aa
--- /dev/null
+++ b/ttf.install
@@ -0,0 +1,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
+}