Source

pkgbuilds / ttf-latex-tlwg / ttf-latex-tlwg.install

Full commit
install_thailatex_fonts() {
    echo ">>> thailatex: patching babel.sty..."
    sync-babel || return 1
    echo ">>> thailatex: updating the filename database..."
    echo ">>> thailatex: updating the fontmap files with updmap..."
    sync-thailatex || return 1
}

remove_thailatex_fonts() {
    echo ">>> thailatex: updating the filename database..."
    texconfig-sys rehash
    echo ">>> thailatex: updating the fontmap files with updmap..."
    updmap-sys --quiet --disable thai.map
}

update_font_cache() {
  echo -n "Updating font cache... "
  fc-cache -fs > /dev/null
  mkfontscale usr/share/fonts/TTF
  mkfontdir usr/share/fonts/TTF
  echo "done."
}

post_install() {
  install_thailatex_fonts $1
  update_font_cache $1
}

post_upgrade() {
  post_install $1
}

post_remove() {
  remove_thailatex_fonts $1
  update_font_cache $1
}