commit 16a1b31e872e2c5eaa7f3a6c4f9c3c040ae0511d parent 27ee8734c98689d7cf844ede5fea2251ad8895f7 Author: Tomas Hlavaty <tom@logand.com> Date: Sun, 8 Dec 2024 21:45:49 +0100 more console fonts functions Diffstat:
M | emacs-framebuffer.el | | | 24 | ++++++++++++++++++++++++ |
1 file changed, 24 insertions(+), 0 deletions(-)
diff --git a/emacs-framebuffer.el b/emacs-framebuffer.el @@ -895,6 +895,30 @@ "console font" :group 'console-font :type 'string) + +(defun console-fonts-candidates () + (or + (ignore-errors (directory-files "/etc/kbd/consolefonts/")) + (ignore-errors (directory-files "/lib/kbd/consolefonts/")) + (ignore-errors (directory-files "/usr/share/kbd/consolefonts")) + )) +;;(console-fonts-candidates) + +(defun console-fonts-list () + (let (z) + (dolist (x (console-fonts-candidates) z) + ;; TODO filter README etc, based on extension + (unless (or (equal "." x) + (equal ".." x) + (string-match "^README" x)) + (push (let ((b (file-name-base x))) + (let ((i (cl-position ?. b))) + (if i + (substring b 0 i) + b))) + z))))) +;;(console-fonts-list) + (defcustom console-fonts (list ;; TODO list from system "ter-i12n" "ter-i14n" "ter-i16n" "ter-i18n" "ter-i20n" "ter-i22n" "ter-i24n" "ter-i28n"