I have attempted to setup emacs 28.2 to display color emojis using the Noto Color Emoji font. According to a "Font Manager" program (provided by font-manager
Debian package), the following symbols are among the glyphs available within the Noto Color Emoji font: ↔, ↕, ↖, ↗, ↘, ↙, ↩, ↪.
I have attempted to use both
(set-fontset-font t 'symbol "Noto Color Emoji")
and
(set-fontset-font t 'emoji "Noto Color Emoji")
to configure the rendering of the symbols under consideration with the Noto Color Emoji font in Emacs buffers.
However, whenever I attempt to input them in an Emacs buffer, they end up rendered with my default font. Yet, emoji symbols like ❇ ✨ do render as expected, in full color, and with Noto Color Emoji font.
I am not sure what is the root cause of the problem. I have attempted to adopt some code suggested at the https://emacs.stackexchange.com/a/62220/40231 to setup code tables, as well as to use emojify
package as suggested at the https://ianyepan.github.io/posts/emacs-emojis/. In both cases, I got the negative result. When I used emojify
package, I did get a correct rendering with its internal png-based insets; after setting the
(setq emojify-display-style 'unicode)
(setq emojify-emoji-styles '(unicode))
I got the same negative (i.e. rendering with default font for some symbols) result.
Could you please suggest, what may be the root cause of the issues that I am experiencing? Could you please assist me with developing a fix?
UPDATE I attempted a following experiment. I have created the following file, then I ran emacs as emacs -Q
and evaluated lines of that file:
;; ↔, ↕, ↖, ↗, ↘, ↙, ↩, ↪.
❇✨
(set-fontset-font t 'emoji "Noto Color Emoji")
(set-fontset-font t 'symbol "Noto Color Emoji")
An end result had been that only the ✨ got rendered with Noto Color Emoji font. The rest were rendered with Deja Vu Sans Mono.
UPDATE I have noticed that the problem does not occur if the text is commented, and is displayed in a corresponding face. That behaviour seems a bit weird to me, since I am not using anything more sophisticated in my face definitions than
;; ...
'(default ((t (:inherit nil :stipple nil :foreground "white" :background "black" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight normal :height 160 :width normal :font "Inconsolata"))))
;; ...
'(font-lock-comment-face ((t (:background "black" :foreground "white" :distant-foreground "snow" :slant oblique :weight normal :height 160 :font "Inconsolata"))))
;; ...
emacs -Q
? Your recipe works fine for me.-Q
switch. Also, the Debian package designation isemacs-gtk 1:28.2+1-10
.emacs -Q
on a debian-testing machine, and it all works. Do you have any local fontconfig files (see PROBLEMS, which you can reach viaC-h C-p
)emacs -Q
there are no such face settings, so I don't understand why it's not working for you)