GNU bug report logs - #70993
set-fontset-font doesn't use specified font for some scripts

Previous Next

Package: emacs;

Reported by: Rodrigo Morales <me <at> rodrigomorales.site>

Date: Fri, 17 May 2024 03:32:02 UTC

Severity: normal

Tags: moreinfo

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 70993 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 70993 <at> debbugs.gnu.org, Rodrigo Morales <me <at> rodrigomorales.site>
Subject: Re: bug#70993: set-fontset-font doesn't use specified font for some
 scripts
Date: Fri, 28 Feb 2025 18:27:53 -0800
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Rodrigo Morales <me <at> rodrigomorales.site>
>> CC: <70993 <at> debbugs.gnu.org>
>> Date: Sat, 18 May 2024 01:17:33 -0500
>>
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>>
>> > In any case, it sounds like Emacs rejects the Cozette font for some
>> > scripts.  Why that happens, I don't know, sorry.  Can you set font-log
>> > to nil before you visit your a.txt file, and then post the value of
>> > font-log after the file is displayed?  That could perhaps tell us
>> > something about the cause of this behavior.
>>
>> I performed two experiments. I emptied ~/.config/emacs/init.el and
>> inserted the sexps showed in the first code block below. The content of
>> =/tmp/a.txt= is shown in the second code block below.
>>
>> #+HEADER: :tangle ~/.config/emacs/init.el
>> #+BEGIN_SRC elisp
>> (set-fontset-font t 'brahmi (font-spec :family "Cozette"))
>> (set-fontset-font t 'egyptian (font-spec :family "Cozette"))
>> (set-fontset-font t 'ethiopic (font-spec :family "Cozette"))
>> (set-fontset-font t 'tagbanwa (font-spec :family "Cozette"))
>> (set-fontset-font t 'han (font-spec :family "Cozette"))
>> #+END_SRC
>>
>> #+HEADER: :tangle /tmp/a.txt
>> #+BEGIN_SRC text
>> The following lines were retrieved from the HELLO buffer which is
>> opened by calling view-hello-file in GNU Emacs 29.3.
>> Brahmi (๐‘€ฉ๐‘†๐‘€ญ๐‘€ธ๐‘€ณ๐‘†๐‘€ซ๐‘€ป)	๐‘€ฆ๐‘€ซ๐‘€ฒ๐‘†๐‘€ข๐‘‚
>> Egyptian Hieroglyphs (๐“‚‹๐“ค๐“ˆ–๐“†Ž๐“…“โ€Œ๐“๐“Š–)	๐“…“๐“Šต๐“๐“Šช, ๐“‡๐“‡‹๐“‚ป๐“˜๐“‡‹
>> Amharic (แŠ แˆ›แˆญแŠ›)	แˆ แˆ‹แˆ
>> Tagbanwa (แฆแชแฏ)	แซแฉแฌแฅ แฃแฎแงแฏ
>> Chinese (ไธญๆ–‡,ๆ™ฎ้€š่ฏ,ๆฑ‰่ฏญ)	ไฝ ๅฅฝ
>> #+END_SRC
>>
>> 1. I launched =emacs= without the =-Q= flag so that
>>    =~/.config/emacs/init.el= is read. Then, I evaluated =(setq
>>    font-log nil)=. Then, I evaluated =(find-file
>>    "/tmp/a.txt")=. Brahmi and Egyptian Hieroglyphs were shown as
>>    hexadecimal codes inside boxes. Amharic, Tagbanwa and Chinese
>>    characters were shown using other fonts. Then, I evaluated
>>    =(describe-variable 'font-log)=. The content of the =*Help*= buffer
>>    can be found here:
>>    http://web.archive.org/web/20240518060947/http://0x0.st/XPqh.txt
>
> Did you also make Cozette the default font?  If not, why not?  I
> thought your intent was to use the same font for all the characters,
> including ASCII?  Emacs will use the default font for any non-ASCII
> characters that the default font supports, so if you want all of them
> to use Cozette, you should start Emacs as "emacs -fn Cozette", or use
> add-to-list to customize the 'font' parameter in default-frame-alist.

Ping.  I think we need more information here to proceed.




This bug report was last modified 81 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.