Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add font installation instructions for Linux #17

miguelsousa opened this Issue Sep 27, 2012 · 26 comments


None yet

miguelsousa commented Sep 27, 2012

No description provided.

In principal it is the same in Ubuntu 12.04 as in Win7:

  • Unzip the font files from the downloaded archive.
  • Select the single font or multiple fonts for installation in the file manager.
  • Right click the selection and choose "Open with Font Viewer" (I am not sure about the exact wording, but in German it is called "Mit Font Viewer öffnen").
  • The Font Viewer shows the font and provides a "Install Font" button.
  • Clicking the "Install Font" button installs the Font.

btw. I am using the Source Code Pro now happily in Qt Creator 2.5. Thanks a lot!

mfoo commented Sep 28, 2012

This is not always the case. My Font Viewer application didn't have permission to write to the fonts directory, and it's a pain to mass import fonts this way!

For system wide installation, copy the fonts to /usr/share/fonts and run sudo fc-cache to rebuild the font cache, or for user local installation, make sure ~/.fonts exists, copy them into there, then rebuild the font cache.


ppicazo commented Sep 28, 2012

Providing installation instructions which encompass all flavors of *nix (and other operating systems) is a slippery slope and outside domain of this project in my opinion. The installation is no different than other open type or true type fonts, for which much documentation exists already.

Example Google search results:

I would recommend that the generic instructions provided by @mfoo be included in (or linked from) the projects documentation, but leave distribution / version specific installation details the responsibility of the user to investigate.

@miguelsousa miguelsousa closed this Dec 7, 2012

On Fedora 20, you can install these fonts using the following command:

sudo yum install adobe-source-code-pro-fonts

See this page for more details.

Ubuntu 14.04:

[ -d /usr/share/fonts/opentype ] || sudo mkdir /usr/share/fonts/opentype
sudo git clone https://github.com/adobe-fonts/source-code-pro.git /usr/share/fonts/opentype/scp
sudo fc-cache -f -v

yngwin commented Mar 15, 2015

On Gentoo:

emerge -av source-pro

Set the cjk useflag if source-han-sans is also wanted. Set appropriate LINGUAS flags for the regional subsets of Source Han Sans.

@foozlevazquez i would add this line to the ubuntu instructions:
sudo rm -rf /usr/share/fonts/opentype/scp/.git*

mykolaj commented Mar 18, 2015

@eksperimental no need to remove git repository, because it allows to download any updates by executing 'git pull'

denji commented May 17, 2015

# Userland mode (~$USER/), (~/).

# ~/.fonts is now deprecated and that
# ~/.local/share/fonts should be used instead

echo "installing fonts at $PWD to $FONT_HOME"
mkdir -p "$FONT_HOME/adobe-fonts/source-code-pro"
# find "$FONT_HOME" -iname '*.ttf' -exec echo '{}' \;

(git clone \
   --branch release \
   --depth 1 \
   'https://github.com/adobe-fonts/source-code-pro.git' \
   "$FONT_HOME/adobe-fonts/source-code-pro" && \
fc-cache -f -v "$FONT_HOME/adobe-fonts/source-code-pro")

joke2k commented Sep 20, 2015

Maybe we can use -b master in order to clone only the master branch instead of all repository.

git clone -b master https://github.com/adobe-fonts/source-code-pro.git ~/.fonts/adobe-fonts/source-code-pro

miguelsousa commented Sep 21, 2015

@joke2k You should clone the release branch instead, because that's where the OTFs and TTFs are located.

I used this shortened version of @denji's script:

git clone --depth 1 --branch release https://github.com/adobe-fonts/source-code-pro.git ~/.fonts/adobe-fonts/source-code-pro
fc-cache -f -v ~/.fonts/adobe-fonts/source-code-pro


mafagafogigante commented May 9, 2016

Just in case a Fedora user is reading this, in newer Fedora versions you can use

sudo dnf install adobe-source-code-pro-fonts

Painless, 1 MB download and installation.

divansantana commented May 20, 2016

Arch Linux

 sudo pacman -S adobe-source-code-pro-fonts


 yaourt adobe-source-code-pro-fonts

deb0ch commented Jun 4, 2016

@denji @rotty3000 @foozlevazquez : On ubuntu 16.04 when I tried like you to just clone the repo, put it somewhere fc-cache will look for it (i.e. ~/.local/share/fonts, ~/.local/share/fonts/opentype, /usr/share/fonts or /usr/share/fonts/opentype) and run fc-cache -f -v, characters in that font are just displayed as squares (see screenshot).

I believe it is because I did not built the fonts from source (for which I miss the building tools like mkotf).

Seeing your instructions, you seem to have just cloned the repo, ran fc-cache -f -v and boom, it automagically worked.

Am I right ? Or what did I miss ?

screenshot from 2016-06-04 14-26-40

EDIT: I figured out the problem. Apparently you have to checkout the release branch. I was doomed because I was on master and then on new-release.

Be sure to checkout the release branch or you can simply download the release binaries instead of cloning the entire repo.

For Ubuntu 14.04 (based @foozlevazquez's answer, just clone the release branch)

[ -d /usr/share/fonts/opentype ] || sudo mkdir /usr/share/fonts/opentype
sudo git clone --depth 1 --branch release https://github.com/adobe-fonts/source-code-pro.git /usr/share/fonts/opentype/scp
sudo fc-cache -f -v

@alanct-minted alanct-minted referenced this issue in alanctkc/dotfiles Aug 9, 2016


Configure urxvt #37

how to install on freebsd base xface4

AbigailBuccaneer commented Oct 27, 2016

This package is available via nixpkgs. To install it and make it available to applications, I did the following:

nix-env -i source-code-pro
mkdir -p "$HOME/.config/fontconfig"
cat > "$HOME/.config/fontconfig/fonts.conf" <<-EOF
    <?xml version="1.0"?>
    <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
fc-cache -f -v

jsejcksn commented Dec 3, 2016

I read that for local usage, ~/.fonts is now deprecated and that ~/.local/share/fonts should be used instead. This seems to be confirmed by Font Viewer installing them to that directory in Unity desktop. Is what I read correct?

@deb0ch deb0ch referenced this issue in syl20bnr/spacemacs Dec 11, 2016


spacemacs not showing correctly #7938

fangqiao commented Feb 8, 2017

I upgraded emacs to 25 then spacemacs can't find Source Code Pro anymore. It worked on emacs 24.

I use debian the jessie.

After I reinstall 24.4, the font is loaded again.

@AbigailBuccaneer Thanks for the tip. But my problem is not about installing code pro font. I installed it correctly and emacs 24 works well. But the problem is with emacs 25.1, the latest version of emacs. It couldn't find the font.

SimonAM commented Mar 23, 2017

@fangqiao I had the same problem. This fixed it:
sudo apt-get build-dep emacs24
If it complains about URI, do this first:
sudo sed -i -- 's/#deb-src/deb-src/g' /etc/apt/sources.list && sudo sed -i -- 's/# deb-src/deb-src/g' /etc/apt/sources.list

Vdragon commented Apr 15, 2017

There's another issue that I encountered while trying to install Source Han Serif: There's no simple method to extract a multipart zip archive files.

@foozlevazquez Your method has a horrible side-effect. For details, please see the bug that I filed with KDE -

I would recommend you to edit your comment or removing it altogether.

By following @foozlevazquez method of just cloning the repo, any application on linux that uses fonts would take 6s to load (due to scanning for fonts).

For the package maintainers, I scrolled down and found @foozlevazquez 's approach first, hence why I got stuck while trying to install. I love these fonts, and it would be great to point people to using the release branch when cloning/downloading. One such approach was posted by @wiserfirst . Thanks!

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