seagle0128 / doom-modeline

A fancy and fast mode-line inspired by minimalism design.
https://seagle0128.github.io/doom-modeline/
GNU General Public License v3.0
1.29k stars 159 forks source link

Modeline icons resolve to strange characters #310

Closed jwhittle933 closed 4 years ago

jwhittle933 commented 4 years ago

Describe Mode line resolves major mode icons (Go in my case) to I suppose Chinese characters, as well as others. I have powerline and nerd fonts installed. Switch around between them the result is the same.

Steps and Expected I sincerely have no idea how one would reproduce this. Config:

dotspacemacs-mode-line-theme '(doom)
...
(setq doom-modeline-icon (display-graphic-p))
  (setq doom-modeline-major-mode-icon t)
  (setq doom-modeline-major-mode-color-icon t)
  (setq doom-modeline-unicode-fallback nil)
  (set-face-attribute 'mode-line nil :family "SauceCodePro NF" :height 100)

Environment: I'm on a 2020 16" MacBook Pro, Emacs installed from binary, running Spacemacs.

Additional context

Screen Shot 2020-02-18 at 1 42 53 PM Screen Shot 2020-02-18 at 1 43 51 PM
seagle0128 commented 4 years ago

Would you please check if you installed all-the-icons fonts correctly as the description in README?

seagle0128 commented 4 years ago

all-the-icons are necessary. Run M-x all-the-icons-install-fonts to install the resource fonts. On Windows, the fonts should be installed manually. all-the-icons only support GUI. Please refer to all-the-icons.el for details.

If the icons are not displayed correctly although all-the-icons fonts are installed correctly, please install the non-free font Symbola. This issue usually occurs on Windows.

Please reopen if you still have trouble.

bk138 commented 1 year ago

I have the issue as well, though with a different config on GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.37, cairo version 1.16.0) of 2023-05-14, modified by Debian.

I have:

Here's a minimal self-bootstrapping config to repro:

;;
;; bootstrap use-package as per http://cachestocaches.com/2015/8/getting-started-use-package/
;;
(require 'package)
(setq package-enable-at-startup nil)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(if (string-equal system-type "gnu/linux")
    (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")) ; make default https elpa usable again
(package-initialize)
(unless (package-installed-p 'use-package)
  (package-refresh-contents)
  (package-install 'use-package))

;; configure use-package
(eval-when-compile
  (require 'use-package)
  (require 'use-package-ensure)
  (setq use-package-always-ensure t))

(use-package all-the-icons)

(use-package doom-modeline
  :config
  (doom-modeline-mode)
  )

With which the modeline then looks like this: image

Would you be so kind and reopen @seagle0128 ? Is there anything I can do to rule out an issue on the distribution's side?

seagle0128 commented 1 year ago

@bk138 Currently nerd-icons is used in doom-modeline, while all-the-icons has been dropped. You should install nerd-fonts via M-x nerd-icons-install-fonts. Please read REAME.

bk138 commented 1 year ago

@bk138 Currently nerd-icons is used in doom-modeline, while all-the-icons has been dropped. You should install nerd-fonts via M-x nerd-icons-install-fonts. Please read REAME.

Yeah that's it. Thank you!

ptkab commented 1 year ago

@bk138 Currently nerd-icons is used in doom-modeline, while all-the-icons has been dropped. You should install nerd-fonts via M-x nerd-icons-install-fonts. Please read REAME.

This was it. I was using all-the-icons too in my config. Installing nerd-fonts resolved the issue.

dfireBird commented 1 year ago

I have this issue in Windows. Even after installing nerd-fonts manually using font viewer.

I used nerd-icon-insert and can see that some of icons don't have proper fonts and resolve to boxes instead.

seagle0128 commented 1 year ago

@dfireBird M-x nerd-icons-install-fonts. Please see https://github.com/rainstormstudio/nerd-icons.el#installing-fonts.

AnweshGangula commented 4 months ago

@bk138 Currently nerd-icons is used in doom-modeline, while all-the-icons has been dropped. You should install nerd-fonts via M-x nerd-icons-install-fonts. Please read REAME.

This was it, finally. Thank you