[Bugfix] Make gpolonkai/set-font-size and --set-emoji-font work for text frames
This commit is contained in:
		@@ -1059,12 +1059,13 @@ Before this can be used, make sure the [[https://zhm.github.io/symbola/][Symbola
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
#+BEGIN_SRC emacs-lisp
 | 
					#+BEGIN_SRC emacs-lisp
 | 
				
			||||||
(defun gpolonkai/set-font-size (frame)
 | 
					(defun gpolonkai/set-font-size (frame)
 | 
				
			||||||
 | 
					  (when (display-graphic-p frame)
 | 
				
			||||||
    (set-face-attribute 'default frame :font "Hack-12")
 | 
					    (set-face-attribute 'default frame :font "Hack-12")
 | 
				
			||||||
  (set-frame-font "Hack-12" t frame))
 | 
					    (set-frame-font "Hack-12" t frame)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(defun --set-emoji-font (frame)
 | 
					(defun --set-emoji-font (frame)
 | 
				
			||||||
  "Adjust the font setting of FRAME so Emacs can display Emoji properly."
 | 
					  "Adjust the font setting of FRAME so Emacs can display Emoji properly."
 | 
				
			||||||
  (when (fboundp 'set-fontset-font)
 | 
					  (when (display-graphic-p frame)
 | 
				
			||||||
    (set-fontset-font t 'symbol
 | 
					    (set-fontset-font t 'symbol
 | 
				
			||||||
                      (font-spec :family "Symbola")
 | 
					                      (font-spec :family "Symbola")
 | 
				
			||||||
                      frame 'prepend)))
 | 
					                      frame 'prepend)))
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user