From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#66416: 29.1; Crashes when visiting HELLO file with pgtk on Wayland Date: Wed, 11 Oct 2023 14:31:20 +0300 Message-ID: <838r89v1iv.fsf@gnu.org> 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> <86y1gajve8.fsf@lan> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8972"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 66416@debbugs.gnu.org To: Yuchen Guo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 11 13:33:06 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 1qqXSc-0001zK-0w for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 11 Oct 2023 13:33:06 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqXSE-0002Pc-Te; Wed, 11 Oct 2023 07:32:42 -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 1qqXSD-0002P1-Kq for bug-gnu-emacs@gnu.org; Wed, 11 Oct 2023 07:32:41 -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 1qqXSD-0003Lz-2n for bug-gnu-emacs@gnu.org; Wed, 11 Oct 2023 07:32:41 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qqXSY-0007dO-FL for bug-gnu-emacs@gnu.org; Wed, 11 Oct 2023 07:33:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Oct 2023 11:33: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.169702392529263 (code B ref 66416); Wed, 11 Oct 2023 11:33:02 +0000 Original-Received: (at 66416) by debbugs.gnu.org; 11 Oct 2023 11:32:05 +0000 Original-Received: from localhost ([127.0.0.1]:37646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqXRc-0007bt-Nf for submit@debbugs.gnu.org; Wed, 11 Oct 2023 07:32:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qqXRY-0007YV-Kg for 66416@debbugs.gnu.org; Wed, 11 Oct 2023 07:32:04 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qqXR6-0003EC-5D; Wed, 11 Oct 2023 07:31:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=nAz7eUOXkgOSDWKnTVHnfQcHB1h/eSvSoPSyBU6+DPg=; b=QFCeNYckIC1U4hZnDL/w Ve7FoxS4OWOP7BphAaXc443x8AQcdJv5VN7V63Xdk0uYBYP/6TN1A+tX8xdBuZjXdXKuL8cItSP1E E/M4BFw6oHOJvr6VKT3DayyjDp5Xqno46uVmMQTTbKc/Yc96h4gc9j9X/k1HZAnTHeO0An5d8RbrE IHYXfTjGEF+DGvO7IvOzYuEEqzVrD9N76lJg14ffvdF87VF3YGTfqjQBdRhbqT2yDJwR1WCOptUB/ +I1pUA9CCEakAjaemhxGxNZSEzmO5r7h6lfZ40VQm3WqVGZ3nXan+TY6SelGDfCQOj5FT/C/qNVAX TF6p4Y4SXzG3XA==; In-Reply-To: <86y1gajve8.fsf@lan> (message from Yuchen Guo on Tue, 10 Oct 2023 16:26:55 +0000) 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:272250 Archived-At: > From: Yuchen Guo > Cc: 66416@debbugs.gnu.org > Date: Tue, 10 Oct 2023 16:26:55 +0000 > > 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 Try font-info instead, and look at the last, 13th, element of the vector it returns. The doc string of font-info describes what it can tell you. > > 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 Environments' > 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. See above. If the fonts you want to use indeed have the appropriate language-system tags, then you can request those tags to be present via set-fontest-font, by using the font-spec function to specify the FONT-SPEC argument. See the doc string of font-spec for how to specify language-system tags. > 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. The beauty of using font-spec is that you don't have to name the fonts or their family names, only specify their properties and features, and Emacs will find the right font(s) automatically (or at least it should). > In the meantime, I'm using the following snippet for fallback. I've > removed all other configuration: > > (defun my-configure-font (frame) > "Configure font given initial non-daemon FRAME. > Intended for `after-make-frame-functions'." > ;; 简体中文与标点。 > (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" :weight 'medium)) > (remove-hook 'after-make-frame-functions #'my-configure-font)) > > (add-hook 'after-make-frame-functions #'my-configure-font) > > Does this make any sense? Yes, I think so.