The Complete Computer

Capturing an Emacs SVG screenshot

LifeTechEmacsArcology
As mentioned by Clement on Mickey's blog post, Emacs 27.1 can use Cairo to take SVG screenshots of itself. The result is, of course, resizeable without aliasing, and looks great in a Web browser.
emacs-lisp source: :tangle svg-screenshot.el :results none
(defun screenshot-svg () "Save a screenshot of the current frame as an SVG image. Saves to a temp file and puts the filename in the kill ring." (interactive) (let* ((filename (make-temp-file "Emacs" nil ".svg")) (data (x-export-frames nil 'svg))) (with-temp-file filename (insert data)) (kill-new filename) (message filename)))