commit 23ab19d4139228c45268aee9fe2dad6a1b24a96b parent cbb6544cebcc6a74502c0a0c26a754a909e52fdb Author: Tomas Hlavaty <tom@logand.com> Date: Sun, 11 Sep 2022 19:21:05 +0200 change console font Diffstat:
M | emacs-framebuffer.el | | | 37 | +++++++++++++++++++++++++++++++++++++ |
1 file changed, 37 insertions(+), 0 deletions(-)
diff --git a/emacs-framebuffer.el b/emacs-framebuffer.el @@ -843,4 +843,41 @@ (write-region (point-min) (point-max) file))))))))) (find-file file)) +(defun console-font (x) + (interactive "sfont: ") ;; TODO autocomplete + (suspend-emacs (format "setfont %s;fg" x)) + (message (format "font is %s" x))) +;; (console-font "ter-i12n") +;; (console-font "ter-i14n") +;; (console-font "ter-i16n") +;; (console-font "ter-i18n") +;; (console-font "ter-i20n") +;; (console-font "ter-i22n") +;; (console-font "ter-i24n") +;; (console-font "ter-i28n") +;; (console-font "ter-i32n") +(defcustom console-font "ter-i28n" + "console font" + :group 'console-font + :type 'string) +(defcustom console-fonts (list ;; TODO list from system + "ter-i12n" "ter-i14n" "ter-i16n" "ter-i18n" + "ter-i20n" "ter-i22n" "ter-i24n" "ter-i28n" + "ter-i32n") + "console-fonts" + :group 'console-font + :type '(list string)) +(defun console-font-size-inc () + (interactive) + (console-font + (setq console-font (or (cadr (member console-font console-fonts)) + console-font)))) +(defun console-font-size-dec () + (interactive) + (console-font + (setq console-font (or (cadr (member console-font (reverse console-fonts))) + console-font)))) +;;(global-set-key (kbd "M-+") 'console-font-size-inc) +;;(global-set-key (kbd "M--") 'console-font-size-dec) + (provide 'emacs-framebuffer)