From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Shuguang Sun Newsgroups: gmane.emacs.help Subject: Font setting for runemacs and frame Date: Tue, 12 Feb 2019 18:03:44 +0800 Message-ID: <41940.7396971778$1549966468@news.gmane.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="79800"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) Cc: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 12 11:14:24 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gtV53-000KZK-68 for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Feb 2019 11:14:21 +0100 Original-Received: from localhost ([127.0.0.1]:36680 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtV51-0005UY-So for geh-help-gnu-emacs@m.gmane.org; Tue, 12 Feb 2019 05:14:19 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gtV4q-0005UR-MZ for help-gnu-emacs@gnu.org; Tue, 12 Feb 2019 05:14:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gtV4j-0005az-Ug for help-gnu-emacs@gnu.org; Tue, 12 Feb 2019 05:14:08 -0500 Original-Received: from smtpbg478.qq.com ([59.36.132.92]:56449 helo=qq.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gtV4h-0004j7-Cs for help-gnu-emacs@gnu.org; Tue, 12 Feb 2019 05:14:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512; t=1549965838; bh=ZuVAGOhO6PvGts+a/+LSkzN8IbSEEFbgSRBrp4o+Z10=; h=From:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=jkIsif0KaxlSlkF23zQNKLWacUPQXJL5Fy/vrgq8ZpKpxcpsIGS+W7el64tuspZsz ZQB9IZT9rROyl/jmSi6hFJyKZ20/fsyRJPNJ1Gb433+CFReYz1X6vqWD16eXoug6H+ pEwPmKBvA8zcOKdddzc8+7J8xX5f4QoqbwW3MmY8= X-QQ-mid: esmtp6t1549965837t1s5hisxk Original-Received: from rshmx11052 (unknown [211.144.221.1]) by esmtp4.qq.com (ESMTP) with SMTP id 0 for ; Tue, 12 Feb 2019 18:03:56 +0800 (CST) X-QQ-SSF: 01000000000000F0F4200F00000000G X-QQ-FEAT: aNIQy3Sfu60nhCQkuDYoLHKJI2A9ArUYcOnZS7RiDb02LPEV+BJkyDBu1Zu6W 3UO5gPDaNW2R8AhRiKQ7aucIqX7Z2v/48h5d3bFCCys+Zz775B10amXoY7BKWgYfn+lVXcV fnTFsC5aRIXc6XT11kJ1AvHoOYVL9aXF2xQ417RZUB40Q+QA81tuLX8ncqp69CxibttKALB ZTtzme2w8PlZppNv/a4ck56Evq4OQEX8nH9b9vg2mcW07PQrPyxs1R76u39SC0IniJmZgNO qLFSs+QNEPqn47zOCAh4jBS8O5WfG7S+FwiQ== X-QQ-GoodBg: 0 Original-Newsgroups: gmane.emacs.help Cancel-Lock: sha1:PsTR3eW/ocdQJyduwGYXzfaKH4Y= Posted-To: gmane.emacs.help X-QQ-SENDSIZE: 520 Feedback-ID: esmtp:qq.com:bgforeign:bgforeign4 X-QQ-Bgrelay: 1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 59.36.132.92 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:119374 Archived-At: 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: # Is it due to the window-system-default-frame-alist which might flush all the font setting? -- Best Regards Shuguang Sun