Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken UTF-8 fonts in insert-char #7467

Closed
4 tasks done
liar666 opened this issue Sep 27, 2023 · 6 comments · Fixed by #7448
Closed
4 tasks done

Broken UTF-8 fonts in insert-char #7467

liar666 opened this issue Sep 27, 2023 · 6 comments · Fixed by #7448
Labels
is:bug Something isn't working as intended needs-triage Issue hasn't been assessed yet

Comments

@liar666
Copy link

liar666 commented Sep 27, 2023

I confirm that...

  • I have searched the issue tracker, documentation, FAQ, Discourse, and Google, in case this issue has already been reported/resolved.

  • I have read "How to Debug Issues", and will use it to provide as much information about this issue as possible.

  • The issue can be reproduced on the latest available commit of Doom.

  • The issue can be reproduced on a stable release of Emacs, such as 27, 28, or 29. (Unstable versions end in .50, .60, or .9x)

Expected behavior

Pretty fonts (nerd fonts) work correctly everywhere.

Current behavior

[ search for ''icons display' "icons minibuffer" in the issues and couldn't find a solution]

What I'm doing: trying to insert a UTF-8 char with "C-x 8 Ret" (insert-char)

Nerds font work:

  • in Dashboard
  • inside buffers
  • in powerline

But do not work in

  • minibuffer

See screenshot:
screenshot_2023-09-27-17 21

  • I've tried to reinstall nerd-fonts & all-the-icons,
  • I've upgraded/cleaned/synced/reloaded DoomEmacs.
    In some cases the fonts break in even more places (e.g. buffers), but minibuffer is always broken.

NOTE: using nerd-icons-insert seems to work
screenshot_2023-09-27-17 42
So the problem might be in insert-char rather than minibuffer

Steps to reproduce

  1. open a buffer
  2. M-x insert-char
  3. Type ANT for instance

System Information

https://pastebin.com/Yqeas4xD

@liar666 liar666 added is:bug Something isn't working as intended needs-triage Issue hasn't been assessed yet labels Sep 27, 2023
@hpfr
Copy link
Contributor

hpfr commented Sep 27, 2023

#7448 is expected to fix this. Give it a try if you can.

@hpfr hpfr mentioned this issue Sep 27, 2023
5 tasks
@liar666
Copy link
Author

liar666 commented Oct 9, 2023

I configured the whole sandbox thing, but it still does not work here...

$ DOOMPROFILE=sandbox doom sync
> Tangling your literate config...
  ✓ Done tangling 1 file(s)!
> Synchronizing "sandbox" profile...
  > Installing packages...
    - No packages need to be installed
  > (Re)building packages...
    - No packages need rebuilding
  > Purging orphaned packages (for the emperor)...
    - Skipping builds
    - Skipping elpa packages
    - Skipping repos
    - Skipping regrafting
  > (Re)building profile in /home/user/.local/share/doom/sandbox/@/0/...
    > Deleting old init files...
    > Generating 4 init files...
    > Byte-compiling ~/.local/share/doom/sandbox/@/0init.28.el...
    ✓ Built init.28.elc
  - Restart Emacs or use 'M-x doom/reload' for changes to take effect
✓ Finished in 1.19546s
$ \emacs --profile sandbox --debug-init
Loading /home/user/.emacs.d/profiles/load.28.elc...
Loading /home/user/.emacs.d/profiles/load.28.elc...done
Loading /home/user/.config/emacs-doom-upstream/lisp/doom.el (source)...
Loading /home/user/.config/emacs-doom-upstream/lisp/doom.el (source)...done
* 0.008779:*:load: doom-start nil
* 0.011046:*:hook:doom-before-init-hook: run doom--begin-init-h
* 0.011063::context: +init (t)
* 0.011193:*:init:load: ~/.config/doom-sandbox/init t

The only thing I changed in the config was (I don't have the Fira fonts installed):

(setq
    doom-font (font-spec :family "UbuntuMono Nerd Font Mono" :size 17 :weight 'semi-light)
    doom-unicode-font (font-spec :family "UbuntuMono Nerd Font Mono" :size 17 :weight 'medium)
    doom-symbol-font (font-spec :family "UbuntuMono Nerd Font Mono" :size 17 :weight 'medium)
    doom-variable-pitch-font (font-spec :family "UbuntuMono Nerd Font" :size 15)
)

Result:
screenshot_2023-10-09-16 24

@hpfr
Copy link
Contributor

hpfr commented Oct 11, 2023

The sandbox shouldn’t really be necessary now that the fix is merged. You are not having issues there with Nerd Fonts icons but rather emoji. Do you have an emoji font like Noto Color Emoji installed? If it is something other than Noto Color Emoji, you may need to (setq doom-emoji-font "Emoji Font Family"). You can also drop doom-unicode-font as that was replaced by doom-symbol-font.

@liar666
Copy link
Author

liar666 commented Oct 11, 2023

Thanks! doom-emoji-font did resolve the problem!

@liar666
Copy link
Author

liar666 commented Nov 27, 2023

The problem came back today, when I upgraded DoomEmacs :(

  • doom-emoji-font is still set at the beginning of config.org
  • and I have (emoji +ascii +github +unicode) ; in init.el...

Also, I have noticed that it does not work in *doom:scratch* by default, but when I switch this buffer from its default org-mode to fundamental-mode then is works (and when I switch it back to org-mode it does not work again), whereas it works in standard .org files... Really strange....

@hpfr
Copy link
Contributor

hpfr commented Nov 30, 2023

If you disable the emoji module does it go away?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:bug Something isn't working as intended needs-triage Issue hasn't been assessed yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants