From: Shuguang Sun <shuguang79@qq.com>
Cc: help-gnu-emacs@gnu.org
Subject: Font setting for runemacs and frame
Date: Tue, 12 Feb 2019 18:03:44 +0800 [thread overview]
Message-ID: <41940.7396971778$1549966468@news.gmane.org> (raw)
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
next reply other threads:[~2019-02-12 10:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-12 10:03 Shuguang Sun [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-02-12 10:03 Font setting for runemacs and frame Shuguang Sun
2019-02-12 16:17 ` Eli Zaretskii
2019-02-13 3:27 ` Shuguang Sun
[not found] ` <vk5yimxo9xlw.fsf@qq.com>
2019-02-13 3:40 ` Eli Zaretskii
2019-02-13 5:08 ` Shuguang Sun
[not found] ` <vk5ybm3g2s3t.fsf@qq.com>
2019-02-14 15:04 ` Eli Zaretskii
2019-02-14 15:28 ` Shuguang Sun
2019-02-14 15:40 ` Robert Pluim
2019-02-14 17:01 ` Eli Zaretskii
2019-02-14 17:14 ` Robert Pluim
2019-02-15 9:57 ` Robert Pluim
2019-02-15 10:01 ` Shuguang Sun
[not found] ` <vk5yimxl1ibv.fsf@qq.com>
2019-02-15 14:24 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='41940.7396971778$1549966468@news.gmane.org' \
--to=shuguang79@qq.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.