From d4fca38e9ef4c2593d85df12091a41e22bd0233a Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Fri, 29 Mar 2019 07:50:02 +0100 Subject: [PATCH] [Bugfix] Make gpolonkai/set-font-size and --set-emoji-font work for text frames --- configuration.org | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/configuration.org b/configuration.org index 21155c4..0ef6409 100644 --- a/configuration.org +++ b/configuration.org @@ -1059,12 +1059,13 @@ Before this can be used, make sure the [[https://zhm.github.io/symbola/][Symbola #+BEGIN_SRC emacs-lisp (defun gpolonkai/set-font-size (frame) - (set-face-attribute 'default frame :font "Hack-12") - (set-frame-font "Hack-12" t frame)) + (when (display-graphic-p frame) + (set-face-attribute 'default frame :font "Hack-12") + (set-frame-font "Hack-12" t frame))) (defun --set-emoji-font (frame) "Adjust the font setting of FRAME so Emacs can display Emoji properly." - (when (fboundp 'set-fontset-font) + (when (display-graphic-p frame) (set-fontset-font t 'symbol (font-spec :family "Symbola") frame 'prepend)))