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#54564: 29.0.50; [PATCH] Use gsettings font rendering entries for pgtk builds Date: Sat, 26 Mar 2022 09:20:14 +0300 Message-ID: <83czi9b5gh.fsf@gnu.org> References: <165c1dab82dbf3233ed5f9f481a008eb724aff31.camel@teloden.nl> <87o81t5x9o.fsf@yahoo.com> <83fsn5b6cj.fsf@gnu.org> <8735j55js6.fsf@yahoo.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22850"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54564@debbugs.gnu.org, pieter.van.prooijen@teloden.nl To: Po Lu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 26 07:21:13 2022 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 1nXznU-0005li-Lr for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 26 Mar 2022 07:21:12 +0100 Original-Received: from localhost ([::1]:43602 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nXznT-0006Gt-4i for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 26 Mar 2022 02:21:11 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:33622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nXznK-0006GU-2O for bug-gnu-emacs@gnu.org; Sat, 26 Mar 2022 02:21:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59030) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nXznJ-0002Pk-Qh for bug-gnu-emacs@gnu.org; Sat, 26 Mar 2022 02:21:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nXznJ-0000tw-Mu for bug-gnu-emacs@gnu.org; Sat, 26 Mar 2022 02:21:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 26 Mar 2022 06:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54564 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 54564-submit@debbugs.gnu.org id=B54564.16482756283412 (code B ref 54564); Sat, 26 Mar 2022 06:21:01 +0000 Original-Received: (at 54564) by debbugs.gnu.org; 26 Mar 2022 06:20:28 +0000 Original-Received: from localhost ([127.0.0.1]:52927 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nXzml-0000sx-Hc for submit@debbugs.gnu.org; Sat, 26 Mar 2022 02:20:27 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45884) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nXzmj-0000sk-EL for 54564@debbugs.gnu.org; Sat, 26 Mar 2022 02:20:25 -0400 Original-Received: from [2001:470:142:3::e] (port=47292 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nXzmd-0002JR-Tz; Sat, 26 Mar 2022 02:20:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=3wBD7n7k+64ow22VZEMrOWeY61o6zrgZnm94SThOZt4=; b=GQkiDN56bfhJ UeunUXxUDiM1ZawT815b9Z6lorGI8X/Q1nxX6XEq7qVBFr5gGs88Utl4tTPQ//hBZrNaH13sr77wf +CS43KHF4PXSqH8gGAieRvoYahX5jtH0izJGzA8EjoPFkSeCWJYD07qrjPuN5kafkfCJhknCNCWSU 2e8u9XfRxMINS9Y5ynm2juZHl+QzVEzFhUE9LC61r5HyeYMnZXfg3zthUDnG4CtDvPNZs4MtYj0rE OtpgoK4rir/SBev0gv1GmpfUQ9IadK9PL2IXJLvJ1zxJZFUkyPONTik+xQ1u6rk52TkkhJcBNJGzY o7xJhPYizi3Ru1nzPCSUqw==; Original-Received: from [87.69.77.57] (port=1457 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nXzmc-0005LO-Mf; Sat, 26 Mar 2022 02:20:19 -0400 In-Reply-To: <8735j55js6.fsf@yahoo.com> (message from Po Lu on Sat, 26 Mar 2022 14:07:21 +0800) 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" Xref: news.gmane.io gmane.emacs.bugs:228965 Archived-At: > From: Po Lu > Cc: pieter.van.prooijen@teloden.nl, 54564@debbugs.gnu.org > Date: Sat, 26 Mar 2022 14:07:21 +0800 > > Eli Zaretskii writes: > > > Maybe I could help if I understood the difficulty well enough. What > > exactly is the problem here? In particular, what is meant by "force a > > re-creation of the font with the changed parameters"? How can Emacs > > "re-create" a font? > > Basically, Emacs needs to close every open font object created by the > ftcr (or ftcrhb) font driver, and open it again, if that makes any > sense. Does the below fit the bill? clear_face_cache (true); Or did you mean to do this only on a single frame (or on specific selected frames)? Then looking inside clear_face_cache will tell you how to do that. And one more thing: care should be taken if this is done in response to some async notification, because clearing all the faces will need a thorough redisplay. Most probably all the affected frames need to be marked as "garbaged". > > AFAIU, this uses gsettings to determine some Emacs font-related > > functionality. One aspect that bothers me is whether users will have > > the means to tell Emacs to ignore those gsettings and use the usual > > Emacs defaults instead? I don't think it's a good idea to apply those > > gsettings unconditionally without letting users override that. > > I think all the gsettings-related behavior is controlled by > `font-use-system-font' I don't see any references to that variable in the patch you are discussing. And its name and doc string don't seem to give any clue that it's relevant to this issue. Is this only for fixed-pitch fonts? > but if it's not, we could always make it work that way, or add a new > variable. Yes, I think so.