Fix --set-emoji-font so it works without X

This commit is contained in:
Gergely Polonkai 2016-10-24 18:09:07 +02:00
parent 6924c2bfdd
commit 1e81fafab6

View File

@ -773,15 +773,16 @@
;; https://zhm.github.io/symbola/ ;; https://zhm.github.io/symbola/
(defun --set-emoji-font (frame) (defun --set-emoji-font (frame)
"Adjust the font setting of FRAME so Emacs can display Emoji properly." "Adjust the font setting of FRAME so Emacs can display Emoji properly."
(when (fboundp 'set-fontset-font)
(if (eq system-type 'darwin) (if (eq system-type 'darwin)
;; For NS/Cocoa ;; For NS/Cocoa
(set-fontset-font t 'symbol (set-fontset-font t 'symbol
(font-spec :family "Apple Color Emoji") (font-spec :family "Apple Color Emoji")
frame 'prepend) frame 'prepend)
;; For Linux ;; For Linux
(set-fontset-font t 'symbol (set-fontset-ont t 'symbol
(font-spec :family "Symbola") (font-spec :family "Symbola")
frame 'prepend))) frame 'prepend))))
(use-package company-emoji (use-package company-emoji
:ensure t :ensure t