;;; -*- lexical-binding: t -*-p ;; ;; this file: ;; https://dataswamp.org/~incal/emacs-init/font-incal.el ;; ;; see: ;; https://dataswamp.org/~incal/bad/bad-monospace.el (require 'cl-lib) (defun font-list (pat) (interactive) (or pat (setq pat "mono")) (dolist (f (x-list-fonts pat)) (insert (format "%s\n" f)))) (defun font-init () (interactive) (load-file (file-name-concat user-emacs-directory "theme" "cyberpunk-theme.el")) (set-frame-font "Agave:bold:pixelsize=14") ;; (set-frame-font "-xos4-terminus-bold-r-normal--16-160-72-72-c-80-iso10646-1") (set-fontset-font t 'unicode (font-spec :name "FreeMono") nil 'append)) (defun font-pick (&optional n) (interactive) (or n (setq n 1)) (forward-line n) (let ((font (buffer-substring-no-properties (pos-bol) (pos-eol)))) (set-frame-font font))) (defun font-keys () (interactive) (keymap-local-set "i" (lambda () (interactive) (font-pick -1))) (keymap-local-set "u" #'kill-line) (keymap-local-set "k" #'font-pick)) (provide 'font-incal)