[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Font setting for runemacs and frame
From: |
Shuguang Sun |
Subject: |
Re: Font setting for runemacs and frame |
Date: |
Thu, 14 Feb 2019 23:28:08 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (windows-nt) |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Shuguang Sun <shuguang79@qq.com>
>> Cc: help-gnu-emacs@gnu.org
>> Date: Wed, 13 Feb 2019 13:08:06 +0800
>>
>> (cl-pushnew '(w32 (font . "Consolas-16"))
>> window-system-default-frame-alist)
>>
>> or
>>
>> (add-to-list 'default-frame-alist '(font . "Consolas-16"))
>>
>> To set the default font as Consolas-16 in w32 system.
>
> This will only work for frames other than the first frame.
>
>> To specify font for fontset, cjk etc., I use the code below and actually
>> make it a function and call it in after-make-frame-functions (new frame
>> in daemon mode) or call it after-init-hook (intended for runemacs with
>> `if (not (daemonp))`).
>>
>> (dolist (charset '(kana han cjk-misc bopomofo chinese-gbk gb18030))
>> (set-fontset-font nil charset
>> (font-spec :family "Microsoft Yahei")
>> nil 'prepend))
>
> Why do you need to call this in a hook? Why not just at top level of
> your .emacs file?
Years ago, it didn't work for server or daemon, and I tried the hook way.
Now it seems to work well.
>
>> However with the setting of window-system-default-frame-alist or
>> default-frame-alist above, it takes no effect until I make a new frame
>> (after-make-frame-functions).
>
> This is documented behavior: to modify the looks ofg the first frame,
> you need to set initial-frame-alist in addition to
> default-frame-alist.
>
>
Thanks! Now I understand.
--
Best Regards
Shuguang Sun
- 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/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 <=
- 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
- Re: Font setting for runemacs and frame, Shuguang Sun, 2019/02/15
- Re: Font setting for runemacs and frame, Eli Zaretskii, 2019/02/15
- Message not available
- next new frame's height after initial frame (Was: Font setting for runemacs and frame), Van L, 2019/02/15