[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Q: Custom fontsets and using a non-default fontset
From: |
Yuan Fu |
Subject: |
Re: Q: Custom fontsets and using a non-default fontset |
Date: |
Sat, 7 Sep 2024 20:44:01 -0700 |
> On Sep 4, 2024, at 4:16 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>
>> From: Soham Gumaste <sohamg2@gmail.com>
>> Date: Tue, 3 Sep 2024 12:50:29 -0500
>> Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
>>
>> I used this [1] as init.el and ran `emacs --init-directory=.`. I
>> checked the frame font with (frame-parameter nil 'font) and the output
>> was NOT "fontset-mine" but rather a XLFD string representing the ascii
>> font I chose. My 'emoji script font worked. Please let me know if this
>> is a bug report or an error in my expectation of the output.
>>
>> [1]:
>> (create-fontset-from-fontset-spec
>> (font-xlfd-name
>> (font-spec
>> :name "Fira Code" :height 130 :weight 'medium
>> :registry "fontset-mine")))
>>
>> (set-fontset-font "fontset-mine" 'emoji
>> (font-spec :family "Noto Color Emoji" :foundry "NONE"))
>>
>> (setq default-frame-alist '((font . "fontset-mine")))
>
> What you see is the expected behavior. That's what setting a frame's
> 'font' parameter does when the value is a fontset.
You need to use the (undocumented) :fontset keyword. Also the :fontset keyword
doesn’t work for ‘default face. You need to use (set-fontset-font
"fontset-default" …).
Yuan