Spacemacs isn't finding my Source Code Pro font files, and I think it's a naming issue. I have the fonts installed and in the font cache,

/usr/local/share$ fc-list : file | grep source



But every time I load up spacemacs it returns the error:

Cannot find any of the specified fonts (adobe-source-code-pro)! Font settings
  may not be correct.  

In my .spacemacs file, I have

dotspacemacs-default-font '("adobe-source-code-pro"
                               :size 13
                               :weight normal
                               :width normal
                               :powerline-scale 1.1)

What can I change so that spacemacs will correctly find my fonts?


It wasn't a naming issue, it was a dependency issue possibly related to me using Red Hat Fedora. I was missing the liboft-dev library emacs needs to read .otf files, which are separate from the liboft libraries in Red Hat.

When looking at the ./configuration output, it stated:

Does Emacs use -lfreetype?                              no
Does Emacs use -lm17n-flt?                              no
Does Emacs use -lotf?                                   no
Does Emacs use -lxft?                                   no 

After adding the dependency and re-making, the fonts are correctly recognized under the name "Source Code Pro", which is most likely defined in the .otf file, despite it having a different name.

My .spacemacs file now reads

dotspacemacs-default-font '("adobe-source-code-pro"
                               :size 13
                               :weight normal
                               :width normal
                               :powerline-scale 1.1)

and all the errors are gone. Hope this fixes your problem too!

  • 2
    What gave you ./configuration output? How did you "add the dependency," and then "re-make?" – Caleb Jay Feb 11 '19 at 18:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.