nyan-mode
nyan-mode copied to clipboard
Cat and Rainbow does not scale well on Emacs 27
On Emacs 27 the rainbow segments have visible spaces between them, and the rainbow is significantly higher than the cat.
nyan-mode works perfectly when I use 1.00x scaling but when I increase the scaling I face this same problem.
I kinda found a way to make it somewhat better, locally. All you need to do Is resize all of the xpm images equally in the img folder to suit your particular scaling.
Are you launching emacs server as systemd service? I have the same problem, but the cat size appears to be normal when I launch emacs from my distro's application menu instead of as systemd OS: 5.16.18-1-MANJARO Emacs: 28.1 with native compilation
Are you launching emacs server as systemd service? I have the same problem, but the cat size appears to be normal when I launch emacs from my distro's application menu instead of as systemd OS: 5.16.18-1-MANJARO Emacs: 28.1 with native compilation
I don't have systemd.
Found a band-aid fix.
The issue is that in nyan.el, for some reason when the .xpm
images are created in nyan-cat-image
and nyan-animation-frames
, the scaling wasn't automatically inferred by create-image
even though it's supposed to.
Fix: add the following code to init file after the lines where you (nyan-mode t)
:
(setq nyan-cat-image
(create-image nyan-cat-face-image 'xpm nil :scale 2 :ascent 'center))
(setq nyan-animation-frames
(mapcar
(lambda (id)
(create-image (concat nyan-directory (format "img/nyan-frame-%d.xpm" id))
'xpm nil :scale 2 :ascent 95))
'(1 2 3 4 5 6)))