post_install() {
  echo -n "Updating font cache... "
  mkfontscale /usr/share/fonts/wenquanyi/wqy-zenhei
  mkfontdir /usr/share/fonts/wenquanyi/wqy-zenhei
  fc-cache -s /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.  Those who want to 
    use bitmap font rendering (for 9pt-12pt) can do the following:

cd /etc/fonts/conf.d
rm 65-wqy-zenhei.conf
ln -s ../conf.avail/43-wqy-zenhei-sharp.conf .

    Remove the symlinks 43-wqy-zenhei-sharp.conf and 65-wqy-zenhei.conf from 
    /etc/fonts/conf.d 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/
}
