unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Rodrigo Morales <me@rodrigomorales.site>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 71025@debbugs.gnu.org
Subject: bug#71025: set-fontset-font doesn't show some scripts as glyphless characters
Date: Mon, 20 May 2024 11:49:21 -0500	[thread overview]
Message-ID: <8734qca0oe.fsf@rodrigomorales.site> (raw)
In-Reply-To: <86a5knfs8j.fsf@gnu.org>

Eli Zaretskii <eliz@gnu.org> writes:

> Do you have site-init files in your Emacs installation?  Or some
> early-init file?  Maybe something other than the init file is
> affecting this.  Otherwise, I have no idea why this doesn't work for
> you, as it does for me.

load-history doesn't show other files in the ~/.config directory besides
~/.config/emacs/init.el. Here's how I found it out.

I used the same configuration file.

#+HEADER: :tangle ~/.config/emacs/init.el
#+BEGIN_SRC elisp
(set-fontset-font t 'brahmi nil)
(set-fontset-font t 'egyptian nil)
(set-fontset-font t 'ethiopic nil)
(set-fontset-font t 'tagbanwa nil)
(set-fontset-font t 'han nil)
#+END_SRC

When Emacs GUI opened, I visited the file =/tmp/a.txt=. Brahmi and Egyptian Hieroglyphs were shown as hexadecimal codes. Amharic and Tagbanwa and Chinese were shown with other fonts. I used =describe-char= to find out which font those scripts were using.

Amharic: ftcrhb:-GOOG-Noto Sans Ethiopic-regular-normal-normal-*-12-*-*-*-*-0-iso10646-1 (#x2B)
Tagbanwa: ftcrhb:-GOOG-Noto Sans Tagbanwa-regular-normal-normal-*-12-*-*-*-*-0-iso10646-1 (#x12)
Chinese: ftcrhb:-GOOG-Noto Sans CJK KR-regular-normal-normal-*-12-*-*-*-*-0-iso10646-1 (#x2703)

#+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

I launched =emacs= and I pressed =C-h v load-history RET=. The content of the =*Help*= buffer can be found here: http://web.archive.org/web/20240520161841/http://0x0.st/XPww.txt . I searched =.config= inside the =*Help*= buffer and I only found one match: =/home/rodrigo/.config/emacs/init.el=, so I don't think there are other configuration files that are influencing this behavior.

> Or maybe your default font supports those scripts, in which case Emacs
> will use it regardless of the fontset setup?  What happens if you
> change the default font to something that doesn't support these scripts?

I changed the default font to =Cozette=.

#+HEADER: :tangle ~/.config/emacs/init.el
#+BEGIN_SRC elisp
(add-to-list 'default-frame-alist '(font . "Cozette"))
(set-fontset-font t 'brahmi nil)
(set-fontset-font t 'egyptian nil)
(set-fontset-font t 'ethiopic nil)
(set-fontset-font t 'tagbanwa nil)
(set-fontset-font t 'han nil)
#+END_SRC

When Emacs GUI opened, I visited the file =/tmp/a.txt=. Brahmi and Egyptian Hieroglyphs were shown as hexadecimal codes. Amharic and Tagbanwa and Chinese were shown with other fonts. I used =describe-char= to find out which font those scripts were using.

Amharic: ftcrhb:-GNU -Unifont Sample-regular-normal-normal-*-13-*-*-*-d-0-iso10646-1 (#x1221)
Tagbanwa: ftcrhb:-GNU -Unifont Sample-regular-normal-normal-*-13-*-*-*-d-0-iso10646-1 (#x176C)
Chinese: ftcrhb:-GNU -Unifont Sample-regular-normal-normal-*-13-*-*-*-d-0-iso10646-1 (#x4F5F)

Because Unifont was being used for those scripts, I decided to delete
that font from my system just to see what happens. I removed
=unifont-15.1.05.bdf= from the directory =~/.fonts= and executed
=fc-cache -f=. I launched Emacs again and visited =/tmp/a.txt=. I used
=describe-char= to find out the font that were using for those
scripts.

Amharic: ftcrhb:-GOOG-Noto Sans Ethiopic-regular-normal-normal-*-13-*-*-*-*-0-iso10646-1 (#x2B)
Tagbanwa: ftcrhb:-GOOG-Noto Sans Tagbanwa-regular-normal-normal-*-13-*-*-*-*-0-iso10646-1 (#x12)
Chinese: ftcrhb:-GOOG-Noto Sans CJK KR-regular-normal-normal-*-13-*-*-*-*-0-iso10646-1 (#x2703)

Note that these fonts were the same used as when I didn't change the
default font through =(add-to-list 'default-frame-alist '(font . "Cozette"))=.





  reply	other threads:[~2024-05-20 16:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-18  5:59 bug#71025: set-fontset-font doesn't show some scripts as glyphless characters Rodrigo Morales
2024-05-18  7:57 ` Eli Zaretskii
2024-05-18  8:18   ` Eli Zaretskii
2024-05-20 16:49     ` Rodrigo Morales [this message]
2024-05-20 18:02       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8734qca0oe.fsf@rodrigomorales.site \
    --to=me@rodrigomorales.site \
    --cc=71025@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).