2015-11-18 06:08:54 +00:00
|
|
|
;;; funcs.el --- Emoji Layer functions File for Spacemacs
|
|
|
|
;;
|
2018-01-04 07:00:25 +00:00
|
|
|
;; Copyright (c) 2012-2018 Sylvain Benner & Contributors
|
2015-11-18 06:08:54 +00:00
|
|
|
;;
|
|
|
|
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
|
|
|
|
;; URL: https://github.com/syl20bnr/spacemacs
|
|
|
|
;;
|
|
|
|
;; This file is not part of GNU Emacs.
|
|
|
|
;;
|
|
|
|
;;; License: GPLv3
|
|
|
|
|
|
|
|
;; From https://github.com/dunn/company-emoji/README.md for Linux, or on
|
|
|
|
;; Mac OS X and using the Cocoa version of Emacs
|
|
|
|
(defun spacemacs//set-emoji-font (frame)
|
|
|
|
"Adjust the font settings of FRAME so Emacs can display emoji properly."
|
2017-09-12 01:14:40 +00:00
|
|
|
(when (fboundp 'set-fontset-font)
|
|
|
|
(cond
|
|
|
|
((spacemacs/system-is-mac)
|
|
|
|
(set-fontset-font t 'symbol
|
|
|
|
(font-spec :family "Apple Color Emoji")
|
|
|
|
frame 'prepend))
|
|
|
|
((spacemacs/system-is-linux)
|
|
|
|
(set-fontset-font t 'symbol
|
|
|
|
(font-spec :family "Symbola")
|
|
|
|
frame 'prepend)))))
|
2015-11-18 06:08:54 +00:00
|
|
|
|
|
|
|
(defun spacemacs//set-emoji-font-for-current-frame ()
|
|
|
|
"Adjust the font settings of current frame so Emacs can display emoji
|
|
|
|
properly."
|
|
|
|
(spacemacs//set-emoji-font (selected-frame)))
|