[Emacs] Fix commit f5a9608
f5a9608
introduces a bug which prevents the font from being applied if
Emacs is started as a server through systemd, since it does not start
in GUI mode. This commit fixes this behavior by applying the
user-defined font when a new frame is created since the new frame
might be in GUI mode.
This commit is contained in:
parent
413ecb2d2b
commit
91b06ee7b1
@ -386,10 +386,12 @@ don’t. I prefer [[https://github.com/microsoft/cascadia-code][Cascadia Code]],
|
|||||||
(defvar phundrak/default-font-name "Cascadia Code"
|
(defvar phundrak/default-font-name "Cascadia Code"
|
||||||
"Default font.")
|
"Default font.")
|
||||||
|
|
||||||
(when (find-font (font-spec :name phundrak/default-font-name))
|
(add-hook 'server-after-make-frame-hook
|
||||||
(set-face-attribute 'default nil
|
(lambda ()
|
||||||
:font phundrak/default-font-name
|
(when (find-font (font-spec :name phundrak/default-font-name))
|
||||||
:height phundrak/default-font-size))
|
(set-face-attribute 'default nil
|
||||||
|
:font phundrak/default-font-name
|
||||||
|
:height phundrak/default-font-size))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Frame Title
|
*** Frame Title
|
||||||
|
Loading…
Reference in New Issue
Block a user