From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuchen Guo Newsgroups: gmane.emacs.bugs Subject: bug#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland Date: Tue, 10 Oct 2023 16:26:55 +0000 Message-ID: <86y1gajve8.fsf@lan> References: <865y3gq2in.fsf@lan> <83mswsvy0p.fsf@gnu.org> <87bkd7k6b8.fsf@lan> <831qe3ws6d.fsf@gnu.org> <87mswr4ntw.fsf@lan> <83wmvvus3w.fsf@gnu.org> <87cyxnoxp3.fsf@lan> <83pm1mvfw4.fsf@gnu.org> <875y3ews35.fsf@lan> <83h6myvbmh.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17558"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66416@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 10 18:28:03 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qqFaV-0004K0-Jx for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 10 Oct 2023 18:28:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqFaB-0000gs-PS; Tue, 10 Oct 2023 12:27:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qqFaA-0000ge-AR for bug-gnu-emacs@gnu.org; Tue, 10 Oct 2023 12:27:42 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qqFaA-0008Mr-2R for bug-gnu-emacs@gnu.org; Tue, 10 Oct 2023 12:27:42 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qqFaU-0007mw-AJ for bug-gnu-emacs@gnu.org; Tue, 10 Oct 2023 12:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Yuchen Guo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 10 Oct 2023 16:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66416 X-GNU-PR-Package: emacs Original-Received: via spool by 66416-submit@debbugs.gnu.org id=B66416.169695525029894 (code B ref 66416); Tue, 10 Oct 2023 16:28:02 +0000 Original-Received: (at 66416) by debbugs.gnu.org; 10 Oct 2023 16:27:30 +0000 Original-Received: from localhost ([127.0.0.1]:36807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqFZx-0007m5-TZ for submit@debbugs.gnu.org; Tue, 10 Oct 2023 12:27:30 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]:34399) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqFZs-0007lo-CI for 66416@debbugs.gnu.org; Tue, 10 Oct 2023 12:27:28 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 1F063240104 for <66416@debbugs.gnu.org>; Tue, 10 Oct 2023 18:26:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1696955217; bh=fdZghCF16rAKDsReLiJcrigRmVaARCQJEHC8zd13VrY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=JBHeIL24j6bbNSMvrctAoZymQpOy3aUfv/htJKdjSQuh3p5Vzyxehg8D51sj5vNVG 8l6vzs43BAvveM3KXFerMPxhZKtzfWXTP5DgNtguM7kWNpTk4jKMiFf7+YC+j/WqSe U3kL8dGL0ai6Q54akEx8q4YwzCFInQT1ZceMCHq1z+357Pl8rtx/AsI5uXn7fisqNN 621Bjt0INdz7M5w4Z4jhdP2KI+vqVdUzp4aoQ4oV6BSEjSSGFttLhS3r7qZtYWSSR3 7nP7EImNoduTUKrE0pbEHe+X25QOq3LZzNw5s2pohMln6JY4LbB2LxaUks97gwKzXv blTBVj4UZWgOQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4S4hB8408sz9rxf; Tue, 10 Oct 2023 18:26:56 +0200 (CEST) In-Reply-To: <83h6myvbmh.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 10 Oct 2023 16:40:54 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:272225 Archived-At: Eli Zaretskii writes: > Do the fonts that you want to use have such language tags? If they > do, which language tags correspond to what language-environments in > Emacs? How can I check this? I tried `describe-font' on the font I wish to use, the output is the following name (opened by): -GOOG-Noto Serif CJK SC-medium-normal-normal-*-48-*-*-*-*= -0-iso10646-1 full name: Noto Serif CJK SC:pixelsize=3D48:foundry=3DGOOG:weight=3D= medium:slant=3Dnormal:width=3Dnormal:scalable=3Dtrue file name: /.../share/fonts/opentype/noto-cjk/NotoSerifCJK-VF.otf.ttc `fc-match' from fontconfig says familylang: "en"(s) stylelang: "en"(s) fullnamelang: "en"(s) lang: aa|ay|bg|bi|bin|br|ch|da|de|en|es|eu|fj|fo|fur fy|gd|gl|gn|gv|haw|ho|ia|ig|id|ie|io|is|it|ja|ki|ko|kum|lb|mg|nb|nds nl|nn|no|nr|oc|om|os|pt|rm|ru|sel|sm|sma|smj|so|sq|ss|st|sv|sw|tl|to ts|uz|vo|wa|xh|yap|zh-cn|zh-hk|zh-mo|zh-sg|zh-tw|zu|an|fil|ht|jv|kj= |kwm li|ms|na|ng|pap-an|pap-aw|rn|rw|sc|sg|sn|su|za(s) namelang: "en"(s) Does this mean that the font itself is broken? > These all are different language-environments in Emacs. Type > > C-x RET l Chinese TAB > > and you will see the Chinese language-environments that Emacs > supports. When Emacs starts, the initial language-environment is > determined from the system locale, and the default fontset is arranged > accordingly. > > So if certain language tags should be required from Chinese fonts in > specific Chinese language-environments, we can express that in our > default fontset, so that the need for configuring fonts manually is > avoided in more cases. > > ... > See above: is it really impossible? I'm now convinced that this is indeed possible. Thanks for the detailed explanation, and apologies for not reading `(emacs)Language Enviro= nments' earlier. But now I'm unsure whether this is a problem on the part of the font, or something that could be fixed in Emacs. The selection of Free-as-in-Freedom CJK fonts is already too few, good ones even less, we could ill afford to lose more of them due to trivial configuration problems. In the meantime, I'm using the following snippet for fallback. I've removed all other configuration: =09 (defun my-configure-font (frame) "Configure font given initial non-daemon FRAME. Intended for `after-make-frame-functions'." ;; =E7=AE=80=E4=BD=93=E4=B8=AD=E6=96=87=E4=B8=8E=E6=A0=87=E7=82=B9=E3=80= =82 (set-fontset-font t 'han (font-spec :family "Noto Serif CJK SC" :weight = 'medium)) (set-fontset-font t 'cjk-misc (font-spec :family "Noto Serif CJK SC" :we= ight 'medium)) (remove-hook 'after-make-frame-functions #'my-configure-font)) =09 (add-hook 'after-make-frame-functions #'my-configure-font) Does this make any sense?