Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Installing Source Code Pro fonts in ubuntu
# to execute this gist, run the line bellow in terminal
\curl -L https://raw.github.com/gist/3875946/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/downloads/adobe/source-code-pro/SourceCodePro_FontsOnly-$version.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 SourceCodePro_FontsOnly-$version/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"
@MaicolBen

This comment has been minimized.

Copy link

@MaicolBen MaicolBen commented Oct 1, 2015

This command doesn't work for me, it responds with '400 Invalid Request', but with curl to the raw code works for me: curl https://gist.githubusercontent.com/lucasdavila/3875946/raw/1c100cae16a06bef154af0f290d665405b554b3b/install_source_code_pro.sh | sh

@budmc29

This comment has been minimized.

Copy link

@budmc29 budmc29 commented Dec 11, 2015

@MaicolBen solution worked for me too.

@lucas-jones

This comment has been minimized.

Copy link

@lucas-jones lucas-jones commented Jan 28, 2016

Perfect!

@soulawaker

This comment has been minimized.

Copy link

@soulawaker soulawaker commented Dec 19, 2016

Excellent!

@YanYuanFE

This comment has been minimized.

Copy link

@YanYuanFE YanYuanFE commented Sep 26, 2017

perfect!

@hhagblom

This comment has been minimized.

Copy link

@hhagblom hhagblom commented May 20, 2019

Thanks for the script. on my setup of linux I had to add -O SourceCodePro_FontsOnly-$version.zip to the wget command, otherwise I would get a querystring on the downloaded file and the unzip command would not find it.

@amavlyanov

This comment has been minimized.

@lucasdavila

This comment has been minimized.

Copy link
Owner Author

@lucasdavila lucasdavila commented Oct 23, 2019

Hi @amavlyanov

I am not using Ubuntu anymore, but I changed the script as you commented.

thanks.

@lucasdavila

This comment has been minimized.

Copy link
Owner Author

@lucasdavila lucasdavila commented Oct 23, 2019

@hhagblom also added the option you commented, thanks.

@amavlyanov

This comment has been minimized.

Copy link

@amavlyanov amavlyanov commented Oct 24, 2019

Hi @amavlyanov

I am not using Ubuntu anymore, but I changed the script as you commented.

thanks.

that's not a ubuntu-specific rule.

thanks!

@amavlyanov

This comment has been minimized.

Copy link

@amavlyanov amavlyanov commented Oct 24, 2019

btw, https://raw.github.com/gist/3875946/install_source_code_pro.sh gives 400 now. It might be removed.

@fleadope

This comment has been minimized.

Copy link

@fleadope fleadope commented Jan 15, 2020

400 here as well...

@ianyepan

This comment has been minimized.

Copy link

@ianyepan ianyepan commented Apr 5, 2020

Same here, sh: 1: 400:: not found

@devlake

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment