Search code examples
emacsfontsarchlinux

archlinux emacs can't autoload monaco-fonts


I installed the monaco fonts from the AUR in archlinux, and set emacs's fonts to monaco, but it doesn't load the monaco fonts when emacs starts, I have to set the font to monaco manually when starting emacs, can anyone one give me some hint of what to do? This is part of my .emacs.d/init.el:

(custom-set-faces


'(default ((t (:family "Monaco" :foundry "unknown" :slant normal :weight normal :height 128 :width normal)))))

Solution

  • I find the (custom-set-faces ...) doesn't make sense in this case, I use the following code found in https://superuser.com/ and succeed.

    (set-frame-font "Monaco 14" nil t)
    
    (add-to-list 'default-frame-alist
                 '(font . "Monaco 14"))