Years ago I did
sudo bash -c 'echo ":: fonts.googleapis.com" >> /etc/hosts'
sudo bash -c 'echo "0.0.0.0 fonts.googleapis.com" >> /etc/hosts'
and I haven't looked back.