Skip to content

Commit

Permalink
fix(daemon): empty font list if called too early
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Nov 9, 2023
1 parent cbad02d commit e99e989
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions core/me-fonts.el
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,6 @@ scaling factor for the font in Emacs' `face-font-rescale-alist'. See the
(defconst +known-scripts (mapcar #'car script-representative-chars)
"Supported scripts, like `latin', `arabic', `han', and so on.")

(defconst +font-family-list (font-family-list)
"List of available fonts on the system, initialized at startup from
`font-family-list'.")

(defconst +face-attributes
'(:family :foundry :width :height :weight :slant :foreground
:distant-foreground :background :underline :overline :strike-through
Expand All @@ -130,7 +126,7 @@ scaling factor for the font in Emacs' `face-font-rescale-alist'. See the

(defun +font-installed-p (font-family)
"Check if FONT-FAMILY is installed on the system."
(and font-family (member font-family +font-family-list) t))
(and font-family (member font-family (font-family-list)) t))

(defun +apply-font-script (script-or-face)
"Set font for SCRIPT-OR-FACE from `minemacs-fonts-plist'."
Expand Down

0 comments on commit e99e989

Please sign in to comment.