Skip to content

Instantly share code, notes, and snippets.

@Robinlovelace
Forked from lucasdavila/1_ubuntu_terminal_command
Last active October 23, 2023 22:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Robinlovelace/af96b42f98cc6cbb777d0634a6677a22 to your computer and use it in GitHub Desktop.
Save Robinlovelace/af96b42f98cc6cbb777d0634a6677a22 to your computer and use it in GitHub Desktop.
Installing Source Code Pro fonts in ubuntu
# to execute this gist, run the line bellow in terminal
\curl -L https://raw.github.com/gist/af96b42f98cc6cbb777d0634a6677a22/install_source_code_pro.sh | sh
version=1.010
echo "\n* Downloading version $version of source code pro font"
rm -f SourceCodePro_FontsOnly-$version.zip
rm -rf SourceCodePro_FontsOnly-$version
wget https://github.com/adobe-fonts/source-code-pro/releases/download/2.042R-u%2F1.062R-i%2F1.026R-vf/OTF-source-code-pro-2.042R-u_1.062R-i.zip -O SourceCodePro_FontsOnly-$version.zip
echo "\n* Unziping package"
unzip SourceCodePro_FontsOnly-$version.zip
mkdir -p ~/.local/share/fonts
echo "\n* Copying fonts to ~/.local/share/fonts/"
cp OTF/*.otf ~/.local/share/fonts/
echo "\n* Updating font cache"
sudo fc-cache -f -v
echo "\n* Looking for 'Source Code Pro' in installed fonts"
fc-list | grep "Source Code Pro"
echo "\n* Now, you can use the 'Source Code Pro' fonts, ** for sublime text ** just add the lines bellow to 'Preferences > Settings':"
echo '\n "font_face": "Source Code Pro",'
echo ' "font_size": 10'
echo "\n* Finished :)\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment