;;; -*- lexical-binding: t -*- ;; -------------------------------------------------------------------------- (require 'cl-lib) (cl-pushnew "." load-path :test #'string=) (require 'luki-lisp) ;; -------------------------------------------------------------------------- (defvar bad-only-ascii) (setq bad-only-ascii nil) ;; -------------------------------------------------------------------------- (let* ((ascii-only (list "Fixed:weight=bold:pixelsize=13" "Terminus:weight=bold:pixelsize=16" "Terminess Nerd Font Mono:weight=bold:pixelsize=14" )) (unicode-fine (list "Agave:pixelsize=16" "Agave:pixelsize=14" "FantasqueSansM Nerd Font Mono:weight=bold:pixelsize=14" "FreeMono:weight=bold:pixelsize=14" )) (fonts `(,@ascii-only ,@unicode-fine)) (i) (num-fonts)) (defun bad-next-monospace-font (&optional prev) (i) (when (gfx) (unless num-fonts (setq fonts (cl-remove-if-not(L (f) (find-font (font-spec :name f))) fonts)) (setq num-fonts (--- fonts))) (if i (setq i (m (++ i (if prev -1 1)) num-fonts)) (setq i 0)) (let* ((f (nth i fonts))) (set-frame-font f) (setq bad-only-ascii (! (member f unicode-fine))) (unless (z i) ($ "[%s] %s" (if bad-only-ascii "ascii" "unicode") f)))))) (declare-function bad-next-monospace-font nil) ;; -------------------------------------------------------------------------- (<- 'bad-font)