Ensure default font family is always valid
If the default face's font is unspecified, then just use "monospace".
This commit is contained in:
parent
f8204e82dc
commit
fdd1692a4c
|
@ -112,7 +112,9 @@ Run after hardcoded setup, but before the screenshot is captured."
|
|||
|
||||
(screenshot--define-infix
|
||||
"-ff" "font-family" "Font family to use"
|
||||
'string (symbol-name (font-get (face-attribute 'default :font) :family))
|
||||
'string (let ((font (face-attribute 'default :font)))
|
||||
(if (eq font 'unspecified) "monospace"
|
||||
(symbol-name (font-get font :family))))
|
||||
(if (fboundp #'counsel-fonts)
|
||||
(ivy-read "Font: " (delete-dups (font-family-list))
|
||||
:preselect screenshot-font-family
|
||||
|
|
Loading…
Reference in New Issue