unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Font setting for runemacs and frame
@ 2019-02-12 10:03 Shuguang Sun
  2019-02-12 16:17 ` Eli Zaretskii
  0 siblings, 1 reply; 14+ messages in thread
From: Shuguang Sun @ 2019-02-12 10:03 UTC (permalink / raw)
  To: help-gnu-emacs; +Cc: help-gnu-emacs

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




^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-02-16  3:11 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2019-02-16  3:11             ` next new frame's height after initial frame (Was: Font setting for runemacs and frame) Van L
     [not found]           ` <vk5yimxl1ibv.fsf@qq.com>
2019-02-15 14:24             ` Font setting for runemacs and frame Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).