1
0
Fork 0

fix(emacs): configure font portability across OS

Signed-off-by: Lucas Sta Maria <lucas@priime.dev>
This commit is contained in:
Lucas Sta Maria 2024-05-16 15:08:35 -07:00
parent 68493df7cc
commit ebe45bbc24
No known key found for this signature in database
GPG key ID: F07FB16A826E3B47

View file

@ -49,19 +49,28 @@
(load-theme 'nano t) (load-theme 'nano t)
(nano-light) (nano-light)
(defvar priime-fixed-font "Jetbrains Mono Semibold") (defvar priime-fixed-font
(defvar priime-variable-font "Newsreader") (cond ((eq system-type 'gnu/linux) "JetBrains Mono SemiBold")
((eq system-type 'darwin) "Menlo")
(t "Roboto Mono")))
(defvar priime-variable-font
(cond ((eq system-type 'gnu/linux) "Newsreader")
((eq system-type 'darwin) "Verdana")
(t "Arial")))
(add-to-list 'default-frame-alist '(font . "JetBrains Mono SemiBold-10")) (add-to-list 'default-frame-alist `(font . ,(format "%s-10" priime-fixed-font)))
(defvar font-size 10) (defvar priime-font-size 10)
(defvar font-family "JetBrains Mono SemiBold") (set-frame-font (format "%s %d" priime-fixed-font priime-font-size))
(set-frame-font (format "%s %d" font-family font-size)) (defvar priime-fixed-height
(cond ((eq system-type 'gnu/linux) 0.8)
((eq system-type 'darwin) 1)
(t 1)))
(custom-set-faces (custom-set-faces
'(region ((t (:inherit nano-subtle :background "#EBE5F5")))) '(region ((t (:inherit nano-subtle :background "#EBE5F5"))))
'(lazy-highlight ((t (:inherit region)))) '(lazy-highlight ((t (:inherit region))))
`(variable-pitch ((t (:family ,priime-variable-font :height 125 :weight medium)))) `(variable-pitch ((t (:family ,priime-variable-font :height 125 :weight medium))))
`(fixed-pitch ((t (:family ,priime-fixed-font :height 0.8 :inherit nil)))) `(fixed-pitch ((t (:family ,priime-fixed-font :height ,priime-fixed-height :inherit nil))))
`(shr-text ((t (:inherit variable-pitch-text :family ,priime-variable-font))))) `(shr-text ((t (:inherit variable-pitch-text :family ,priime-variable-font)))))
(set-face-attribute 'italic nil (set-face-attribute 'italic nil
:family 'inherit :family 'inherit