;;; bob.el --- Customizations for "bob" -*- lexical-binding: t; -*- ;;; Commentary: ;;; Code: (require 'acdw) (require 'machine) (defcustom +bob-face-plist '( :dejavu ("DejaVu Sans Mono" "DejaVu Sans") :iosevka ("Iosevka Comfy Wide" "Iosevka Comfy Duo") :plex ("IBM Plex Mono" "IBM Plex Serif") :go/djv ("Go Mono" "DejaVu Sans") :tt (("TT2020Base" 120) "TT2020 Base Style E") ; no italic :courier ("Courier Prime Code" "Courier Prime") :gaegu (("Gaegu" 140) "Gaegu") ; no italic :comic (("Comic Code" 100) "Comic Code") :go/comic (("Go Mono" 100) ("Comic Code" 100)) ) "A plist of possible font combinations.") (defcustom +bob-face-pair :comic ;; (+bob-set-faces) "The index of `+bob-face-pairs' to use.") (defun +bob-set-faces (&rest _) (let* ((face-pair (plist-get +bob-face-plist +bob-face-pair)) (base-face (if (stringp (car face-pair)) (car face-pair) (caar face-pair))) (var-face (if (stringp (cadr face-pair)) (cadr face-pair) (caadr face-pair))) (base-size (or (ignore-errors (cadar face-pair)) 100)) (var-size (or (ignore-errors (cadadr face-pair)) 1.0)) (italic-face nil) ;; (bold-face nil) (mono-face nil)) (+set-faces `((default :family ,base-face :height ,base-size :weight regular) (bold :family ,(or (bound-and-true-p bold-face) base-face) :weight extra-bold) (italic :family ,(or (bound-and-true-p italic-face) base-face) :weight normal :slant italic) (fixed-pitch :family ,(or (bound-and-true-p mono-face) base-face) :height 1.0) (variable-pitch :family ,(or var-face base-face) :height ,var-size ;; :weight medium ) ;; (org-italic ;; :family ,(or var-face base-face) ;; :slant italic) )))) ;; Other ideas: [[https://twitter.com/NPRougier/status/1488570192561160195][from Nic Rougier]] (add-hook 'machine-after-load-theme-hook #'+bob-set-faces) ;; bob.el ends here (+bob-set-faces)