function to change font size
This commit is contained in:
@@ -57,6 +57,19 @@
|
|||||||
((find-font (font-spec :family "DejaVu Sans Mono"))
|
((find-font (font-spec :family "DejaVu Sans Mono"))
|
||||||
(set-frame-font (font-spec :family "DejaVu Sans Mono"))) )
|
(set-frame-font (font-spec :family "DejaVu Sans Mono"))) )
|
||||||
|
|
||||||
|
(defun my-font-set-size (size &optional face)
|
||||||
|
"Change font SIZE of (default) FACE.
|
||||||
|
Example:
|
||||||
|
- (my-font-set-size 16)
|
||||||
|
- (my-font-set-size 14 'default)"
|
||||||
|
(interactive `(,(read-number "Font size: ")))
|
||||||
|
(let ((f (if face face 'default)))
|
||||||
|
(message "%s" f)
|
||||||
|
(set-face-font
|
||||||
|
f
|
||||||
|
(font-spec :family (plist-get (font-face-attributes (face-font f)) :family)
|
||||||
|
:size size)) ))
|
||||||
|
|
||||||
;; (Set-fontset-font FONTSET CHARACTERS FONT-SPEC &optional FRAME ADD)
|
;; (Set-fontset-font FONTSET CHARACTERS FONT-SPEC &optional FRAME ADD)
|
||||||
;; CHARACTERS see `script-representative-chars' and
|
;; CHARACTERS see `script-representative-chars' and
|
||||||
;; ‘list-character-sets’ and ‘list-charset-chars’ for the list of
|
;; ‘list-character-sets’ and ‘list-charset-chars’ for the list of
|
||||||
|
|||||||
Reference in New Issue
Block a user