[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Font setting for runemacs and frame
From: |
Shuguang Sun |
Subject: |
Font setting for runemacs and frame |
Date: |
Tue, 12 Feb 2019 18:03:44 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) |
The following message is a courtesy copy of an article
that has been posted to gmane.emacs.help as well.
Hi,
I have some font setting in my dot emacs, however, it doesn't work
unless after some frame action.
My font setting
```
(cl-pushnew '(w32 (font . "Consolas-16")
(fullscreen . maximized))
window-system-default-frame-alist)
(defun frame-setting (&optional frame)
(when (display-graphic-p)
(message "display-graphic-p"))
(message "frame-setting call")
(let ((frame (or frame (selected-frame))))
(message "frame: %s" frame)
(if (string-equal system-type "windows-nt")
(dolist (charset '(kana han cjk-misc bopomofo chinese-gbk gb18030))
(set-fontset-font nil charset
(font-spec :family "Microsoft Yahei")
frame 'prepend)))))
;; set the font after make frame
(add-hook 'after-make-frame-functions #'frame-setting)
```
And some hooks in after-init-hook
```
(if (not (daemonp))
(progn
(message "frame-setting in non-daemon")
(frame-setting)))
```
The function-setting actually is called.
In case of
```
emacsclientw.exe --alternate-editor= -n -e "(raise-frame )"
```
it messages: frame-setting call
However the font setting make no effect in case of simply run
runemacs.exe, it messages:
frame-setting in non-daemon
display-graphic-p
frame-setting call
frame: #<frame emacs@RSHMX11052 00000000037b6e90>
Is it due to the window-system-default-frame-alist which might flush all
the font setting?
--
Best Regards
Shuguang Sun
- Font setting for runemacs and frame,
Shuguang Sun <=
- Re: Font setting for runemacs and frame, Eli Zaretskii, 2019/02/12
- Re: Font setting for runemacs and frame, Shuguang Sun, 2019/02/12
- Re: Font setting for runemacs and frame, Eli Zaretskii, 2019/02/12
- Re: Font setting for runemacs and frame, Shuguang Sun, 2019/02/13
- Re: Font setting for runemacs and frame, Eli Zaretskii, 2019/02/14
- Re: Font setting for runemacs and frame, Shuguang Sun, 2019/02/14
- Re: Font setting for runemacs and frame, Robert Pluim, 2019/02/14
- Re: Font setting for runemacs and frame, Eli Zaretskii, 2019/02/14
- Re: Font setting for runemacs and frame, Robert Pluim, 2019/02/14
- Re: Font setting for runemacs and frame, Robert Pluim, 2019/02/15