forked from FG42/FG42
add fg42-font function and get-fg42-font function to get fg42 font if set by user or the default one
This commit is contained in:
parent
6c9dfd0a57
commit
9c6c3aab5b
|
@ -58,8 +58,8 @@
|
|||
;; Font Configuration -----------------------------------
|
||||
(ability fira-font ()
|
||||
"Sets the default font to Fira Mono"
|
||||
(add-to-list 'default-frame-alist '(font . "Fira Mono"))
|
||||
(set-face-attribute 'default t :font "Fira Mono"))
|
||||
(add-to-list 'default-frame-alist '(font . (get-fg42-font)))
|
||||
(set-face-attribute 'default t :font (get-fg42-font)))
|
||||
;; ------------------------------------------------------
|
||||
|
||||
(cheatsheet-add :group '--HELP--
|
||||
|
|
|
@ -42,5 +42,4 @@ it inserts comment at the end of the line."
|
|||
(interactive) (join-line -1))))
|
||||
|
||||
|
||||
|
||||
(provide 'extensions/editor/utils)
|
||||
|
|
|
@ -65,6 +65,15 @@ with is the buffer."
|
|||
"Apply the given FACE-SYMBOL to the given TEXT."
|
||||
(put-text-property 0 (length text) 'face face-symbol text))
|
||||
|
||||
(setq fg42--default-font "Fira Mono")
|
||||
|
||||
(defvar fg42-font "" "FG42 font set by user")
|
||||
|
||||
(defun fg42-font (font)
|
||||
(setq fg42-font font))
|
||||
|
||||
(defun get-fg42-font ()
|
||||
(if fg42-font fg42-font fg42--default-font))
|
||||
|
||||
(provide 'fg42/utils)
|
||||
;;; utils.el ends here
|
||||
|
|
Loading…
Reference in New Issue