post_install() {
	echo -n "Updating font cache... "
	mkfontscale /usr/share/fonts/wenquanyi/wqy-zenhei
	mkfontdir /usr/share/fonts/wenquanyi/wqy-zenhei
	fc-cache -f /usr/share/fonts/wenquanyi/wqy-zenhei > /dev/null
	echo "done."
	echo "wqy-zenhei post install message"
cat <<EOF
==> Special Note: By default, we disabled the embedded bitmaps,
    so that the characters will be displayed as Anti-aliased glyphs.
    For those who want to use bitmap font rendering (for 9pt-12pt),
    you can modify the enclosed 65-wqy-zenhei.conf and change the line
	<edit name=\"embeddedbitmap\"><bool>false</bool></edit>
    to
	<edit name=\"embeddedbitmap\"><bool>true</bool></edit>"

    Remove the 65-wqy-zenhei.conf symlink from /etc/fonts/conf.d/
    directory if you have problems with this package.
EOF
}

post_upgrade() {
	post_install $1
}

post_remove() {
	rm -r /usr/share/fonts/wenquanyi/wqy-zenhei
	rmdir --ignore-fail-on-non-empty /usr/share/fonts/wenquanyi/
}
