Closed judemille closed 8 months ago
I think it's related to Fira Code and your nerd fonts. I am using "Cascadia Code" and "Symbol Nerd Fonts". What nerd fonts are you using?
vspc
is a half-width space, and is used between a group of an icon and texts.
The screenshot is below
My suggestion is:
emacs -Q
with doom-modeline
and your font configurations.I'm using Fira Code
. I have :ui unicode
enabled in Doom, and Symbols Nerd Font
installed and enabled.
The issue occurs with Cascadia Code and JetBrains Mono, too.
Here is the appearance with emacs -Q
:
I added MELPA, installed doom-modeline
, set the font to FiraCode Nerd Font
, and enabled doom-modeline-mode
. The gaps between the icons and the text are still uncomfortably small.
I tested on macOS, Windows and Ubuntu, and no issues were observed. I think it may be related to your WM?
I'm running Arch Linux rolling, with KDE 5.27.10.
The issue exists on my laptop too, also Arch, with sway (have not checked version)
Well, I didn't test with KDE. I'm sure there is no issue with GTK, according to my tests.
On my laptop, I'm using the emacs-wayland
package, which has PGTK enabled. I don't think this is toolkit-specific.
Out of curiosity, how does it look for you if you change all vspc
occurrences to just spc
?
No idea why vspc is so narrow in your env. Can you please try this?
(defsubst doom-modeline-vspc ()
"Thin whitespace."
(propertize " " 'face 'variable-pitch))
Changing that did nothing. Replacing all occurrences of doom-modeline-vspc
with doom-modeline-spc
does this:
I have no clue why changing what vspc
is doesn't do anything, but not using it does.
Re-evaluate doom-modeline-segment.el
or compile doom-modeline-core.el
and restart Emacs after changing.
Are you sure the both are spc?
Try:
(defsubst doom-modeline-vspc ()
"Thin whitespace."
(propertize " " 'face 'variable-pitch))
Both are spc, yes. This is known behavior of nerd-icons -- if you put a space after an icon, it will become wider into that space, but still leaving a slight space.
Both are spc, yes. This is known behavior of nerd-icons -- if you put a space after an icon, it will become wider into that space, but still leaving a slight space.
Obviously the behavior is different in my env.
vspc=spc
vspc=1/2 spc
That's fascinating. The only possibly explanation I can come up with is that something about the fontconfig on Arch is different from your Ubuntu install.
I've just realized what's going on. It's Symbols Nerd Font
vs Symbols Nerd Font Mono
.
I didn't have the mono variant installed. Going to install it and see the behavior.
E: That was indeed it. Might be worth a note somewhere in the FAQ or something, to remind people that they should have the mono variant of Symbols Nerd Font installed.
Thank you for the bug report
doom-modeline
related packages.emacs -Q
.Bug description
I am using doom-emacs, with Fira Code, 12pt. The major mode and checker icons do not have any padding to the right of them, which looks very bad.
Steps to reproduce
Install doom-emacs, enable icons in modeline
Expected behavior
Major mode and checker icons have spacing to the right of them.
OS
Linux
Emacs Version
29 (gccemacs)
Emacs Configurations
Doom Emacs
Error callstack
No response
Anything else
The issue can be seen here:
This issue goes away if uses of
doom-modeline-vspc
indoom-modeline-segments.el
are replaced withdoom-modeline-spc
.It is unclear to me why the
vspc
is used anyway -- from all of my experience, the nerd-icons need a full-width space to gain sufficient padding.