GNU bug report logs - #65198
29.1; Emacs29.1 crash in function face_for_font

Previous Next

Package: emacs;

Reported by: 张云峰 <zhangyunfeng0101 <at> gmail.com>

Date: Thu, 10 Aug 2023 09:58:02 UTC

Severity: normal

Found in version 29.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: 张云峰 <zhangyunfeng0101 <at> gmail.com>
Cc: 65198 <at> debbugs.gnu.org
Subject: Re: bug#65198: 29.1; Emacs29.1 crash in function face_for_font
Date: Thu, 10 Aug 2023 20:22:52 +0300
> From: 张云峰 <zhangyunfeng0101 <at> gmail.com>
> Date: Thu, 10 Aug 2023 22:56:23 +0800
> 
> finally  I fix this bug by removing a piece of code:
> 
> (defun +set-chinese-font()
>   (interactive)
>   (set-fontset-font
>    t
>    'han
>    (cond
>     ((string-equal system-type "windows-nt")
>      (cond
>       ((member "Microsoft YaHei" (font-family-list)) "Microsoft YaHei")
>       ((member "Microsoft JhengHei" (font-family-list)) "Microsoft JhengHei")
>       ((member "SimHei" (font-family-list)) "SimHei")))
>     ((string-equal system-type "darwin")
>      (cond
>       ((member "Hei" (font-family-list)) "Hei")
>       ((member "Heiti SC" (font-family-list)) "Heiti SC")
>       ((member "Heiti TC" (font-family-list)) "Heiti TC")))
>     ((string-equal system-type "gnu/linux")
>      (cond
>       ((member "WenQuanYi Micro Hei" (font-family-list)) "WenQuanYi
> Micro Hei"))))))
> 
> (add-hook 'buffer-list-update-hook '+set-chinese-font)

I guess one of these fonts is faulty in some way?  Or maybe you have
neither of these fonts on that system, which would effectively specify
that characters of the han script have no font at all?  Of course,
normally the latter should just cause the han characters to display as
hex codes, not to cause crashes...

Are you saying that just having the above in your customization and
typing some Han character causes Emacs to crash?

P.S. And please use Reply All to reply, so that the bug address is
kept on the CC list.




This bug report was last modified 1 year and 342 days ago.

Previous Next


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