Skip to content

(un)install Helvetica Neue locally

Gaël Poupard edited this page Nov 26, 2020 · 3 revisions

On Ubuntu, (un)installing Helvetica Neue is especially useful to check if webfont is successfully loaded on websites using Boosted while remaining able to work on internal docs for Orange using Helvetica Neue.

Pre-requisite: you should have downloaded Helvetica Neue .ttf fonts and have it in ~/Téléchargements/Helvetica/*. If you prefer to use another directory, ensure to fix paths in the following script.

The script is the following, to add to your .bashrc or .zshrc:

function togglehelvetica() {
    if [ -e "$HOME/.local/share/fonts/HelvNeue75_W1G.tff" ]
    then
	echo "Uninstalling Helvetica Neue…"
        sudo mv "$HOME/.local/share/fonts/HelvNeue{35,45,55,65,75}_W1G.ttf" "$HOME/Téléchargements/Helvetica/"
        sudo fc-cache -f -v
        sudo fc-list | grep "HelvNeue"
        echo "Helvetica Neue is off again."
    else
	echo "Installing Helvetica Neue…"
	sudo mv "$HOME/Téléchargements/Helvetica/*.ttf" "$HOME/.local/share/fonts/"
        sudo fc-cache -f -v
        sudo fc-list | grep "HelvNeue"
        echo "Helvetica Neue is installed again."
    fi
}

You may then use togglehelvetica in your terminal to install or uninstall Helvetica Neue.

To-do

  • check for all files instead of a single one;
  • make path overridable as an argument.

Any other ideas are welcome :)

Clone this wiki locally