[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: |
Wed, 13 Feb 2019 13:08:06 +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 11:27:23 +0800
>>
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>> > For runemacs, why don't you just use default-frame-alist?
>>
>> I use window-system-default-frame-alist trying to manage one dot.emacs
>> for both windows box and linux. It seems both default-frame-alist and
>> window-system-default-frame-alist will flush the font setting.
>
> Sorry, I don't think I follow: what do you mean by "flush"? Can you
> show what you tried with default-frame-alist, and describe the
> effects?
>
(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.
>> I need set different font according to the fontset, and it seems neither
>> default-frame-alist nor window-system-default-frame-alist is able to
>> make it.
>
> Fontsets are the way to customize fonts more flexibly, so I don't
> think I understand what you mean by "different font according to the
> fontset". Again, showing what you do or tried but didn't work, will
> help remove any misunderstanding.
>
> I'm asking all these questions because it sounds like you
> unnecessarily use very complicated means, where much simpler means
> exist that should allow you to do what you want.
>
>
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))
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). Emacs takes font for the fontsets above
according to Windows font fallbacks, e.g., MS Gothic.
Finally, I find that if I put `(set-frame-font "Consolas-16" nil t)` in
my dot.emacs, the font setting for above fontsets works in runemacs case
without additional frame make action.
--
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 <=
- 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
- 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