I have emacs25 build from source (25.0.95).
And the only configure in my init.el is:
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:family "Ubuntu Mono" :foundry "DAMA" :slant normal :weight normal :height 241 :width normal)))))
But when I open emacs
, the font is not changed, if I eval that code manually after emacs
is opened, the font is changed.
I also tried this:
(add-hook 'after-init-hook (lambda ()
(if (display-graphic-p)
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(default ((t (:family "Ubuntu Mono" :foundry "DAMA" :slant normal :weight normal :height 241 :width normal))))))))
The font is still not changed.
Tried solution from @ManuelUberti, still doesn't work for me. And I also notice when I open emacs
, screen has a quick flash which looks like the font is changed (bigger), but some how it seems changed back to default.