Closed cyruseuros closed 3 months ago
I have a couple of problems with daemon mode your particular problem can be solved by adding
(add-to-list 'default-frame-alist
'(font . "-ADBE-Source Code Pro-normal-normal-normal-*-13-*-*-*-m-0-iso10646-1"))
to dotspacemacs/user-config
. You can find the exact font string by SPC SPC set-frame-font
. Does SPC SPC
work for you in daemon mode?
It does, although there are times when I restart Emacs and it spits out that it can't read from stdout or something (any permanent fix for that?). However I already resolved my issue with the snippet included above. I am only posting so the issue can be resolved upstream. I would do it myself, but I'm still new to elisp, and would rather spend some more time learning before pitching in. Appreciate the help though!
I still get this issue (also when loading from a dump) and the fix outlined in the post works for me:
(spacemacs|do-after-display-system-init
(spacemacs/set-default-font dotspacemacs-default-font))
in my user-init or user-config.
Confirmed, the default OS font loads without the workaround.
Once while testing, the mode line separators weren't shown and the spacemacs buffer menu colors were incorrect, but that hasn't happened again the last three times a new daemon/client was started.
#### System Info :computer: - OS: windows-nt - Emacs: 26.3 - Spacemacs: 0.300.0 - Spacemacs branch: develop (rev. 5fcd84d84) - Graphic display: t - Distribution: spacemacs - Editing style: vim - Completion: helm - Layers: ```elisp (autohotkey (auto-completion :variables auto-completion-enable-help-tooltip t auto-completion-enable-snippets-in-popup t) (colors :variables colors-enable-nyan-cat-progress-bar t) emacs-lisp git helm html javascript lsp (markdown :variables markdown-live-preview-engine 'vmd markdown-command "vmd") multiple-cursors (org :variables org-agenda-files '("~/org/notes.org")) (python :variables) ranger (shell :variables shell-default-shell 'eshell shell-default-height 30) spell-checking (syntax-checking :variables syntax-checking-enable-by-default nil) themes-megapack treemacs version-control) ``` - System configuration features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS THREADS LCMS2
I still get this issue (also when loading from a dump) and the fix outlined in the post works for me:
(spacemacs|do-after-display-system-init (spacemacs/set-default-font dotspacemacs-default-font))
in my user-init or user-config.
This has been working until my ArchLinux system upgrade today... :'(
This issue is still valid. As far as I know, there are a few ways to set font in an Emacs Spacemacs distro.
The first is obviously by spacemacs-default-font, this doesn’t work with daemon mode, Spacemacs will warn about invalid family, and fontset will include the courier font.
The next is by ignoring spacemacs and setting Default Face in basic-faces, this works just fine with daemon mode. But spacemacs will still complain and courier will be loaded in the fontset.
I’ve also seen adding a font option to default-frame-alist, but this seems inefficient.
What I’ve noticed is that spacemacs-default-font and default-face will look different, even if they load the same font.
@psisis
Do you have themes-megapack enabled as well?
This layer doesn't seem to do anything other than declaring those themes. I don't know why it would cause any issue.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!
Description :octocat:
Spacemacs does not set the font correctly in daemon mode as in #6197 (workaround included - a potential clue as to what is causing the problem). This only happens when
themes-megapack
layer is installed - even with the defaultspacemacs-dark
theme.Reproduction guide :beetle:
emacs --daemon
/systemctl start --user emacs
)emacs
- not Emacs server)Observed behaviour: :eyes: :broken_heart: The wrong font is set in the Emacs server, while Source Code Pro (the right one) is set in the regular Emacs instance.
The issue disappears if I do either of the following:
themes-megapack
user-init
. My guess is thatthemes-megapack
tries to load the fonts too early, and this later call inuser-init
corrects for the problem.Expected behaviour: :heart: :smile: Adobe Source Code Pro is set as the font in both the Emacs server and the regular instance.
System Info :computer:
Backtrace :paw_prints: