mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
feat(misc): add helper command to display list of available fonts
This commit is contained in:
@@ -72,6 +72,7 @@
|
||||
|
||||
;; Misc.
|
||||
(require 'siren-explain-pause)
|
||||
(require 'siren-list-available-fonts)
|
||||
(require 'siren-lorem-ipsum)
|
||||
(require 'siren-rand)
|
||||
(require 'siren-refine)
|
||||
|
||||
22
modules/misc/siren-list-available-fonts.el
Normal file
22
modules/misc/siren-list-available-fonts.el
Normal file
@@ -0,0 +1,22 @@
|
||||
;;; siren-list-available-fonts.el --- jimeh's Emacs Siren: list-available-fonts helper.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Helper function to list available fonts in a temporary buffer.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(defun list-available-fonts ()
|
||||
"Display a list of available fonts in a new buffer."
|
||||
(interactive)
|
||||
(let ((font-list (sort (font-family-list) 'string<))
|
||||
(buffer-name "*Available Fonts*"))
|
||||
(with-output-to-temp-buffer buffer-name
|
||||
(with-current-buffer buffer-name
|
||||
(dolist (font font-list)
|
||||
(insert font "\n"))
|
||||
(special-mode)))
|
||||
(pop-to-buffer buffer-name)))
|
||||
|
||||
(provide 'siren-list-available-fonts)
|
||||
;;; siren-list-available-fonts.el ends here
|
||||
Reference in New Issue
Block a user