From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri D'Elia Newsgroups: gmane.emacs.devel Subject: Re: Incorrect font weight selected Date: Sun, 19 Dec 2021 12:14:28 +0100 Message-ID: <87fsqog7ep.fsf@wavexx.thregr.org> References: <87pmpv708h.fsf@wavexx.thregr.org> <83r1abcb93.fsf@gnu.org> <87y24jqahr.fsf@wavexx.thregr.org> <83ilvnc6z4.fsf@gnu.org> <875yrmyk8q.fsf@wavexx.thregr.org> <83ee6actjj.fsf@gnu.org> <87o85ef8rg.fsf@wavexx.thregr.org> <83ilvmb0n3.fsf@gnu.org> <87k0g2f77n.fsf@wavexx.thregr.org> <83fsqqaxig.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25598"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.7.5; emacs 29.0.50 Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 19 12:30:32 2021 Return-path: Envelope-to: ged-emacs-devel@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 1myuOd-0006Tw-52 for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Dec 2021 12:30:31 +0100 Original-Received: from localhost ([::1]:44696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1myuOc-0007kY-5W for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Dec 2021 06:30:30 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:48944) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myuNL-0005Ye-SA for emacs-devel@gnu.org; Sun, 19 Dec 2021 06:29:11 -0500 Original-Received: from [2001:41c9:1:41f::63] (port=37434 helo=erc.thregr.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myuNK-00081v-0W; Sun, 19 Dec 2021 06:29:11 -0500 Original-Received: from [5.170.81.94] (helo=localhost) by erc.thregr.org with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) id 1myuNT-001s9q-GP (envelope-from ); Sun, 19 Dec 2021 12:29:19 +0100 In-reply-to: <83fsqqaxig.fsf@gnu.org> X-Host-Lookup-Failed: Reverse DNS lookup failed for 2001:41c9:1:41f::63 (failed) Received-SPF: pass client-ip=2001:41c9:1:41f::63; envelope-from=wavexx@thregr.org; helo=erc.thregr.org X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:282412 Archived-At: On Sat, Dec 18 2021, Eli Zaretskii wrote: >> Just out of curiosity, if you happen to know it, how does the "custom" >> machinery does this then regarding to faces? It it also done in a frame >> hook? > > You mean, how it makes the customization be in effect for future > frames? No, it just records the change in the default faces for new > frames. Which is ok, but then again does it also delay the font selection until the first graphical frame is selected? Otherwise it would also suffer from selecting the font too early when used in daemon mode. On my side, I've tried a few other approaches by never setting the default font (all frames), and only performing lookup/setting frame-specific fonts in the after-make-frame hooks. I'm running into all sort of quirks. Aside from the completely incorrect size (which I've just bumped up for the sake of testing), it looks like a lot of other things get broken. For example the bold version of the 'default face shows undefined glypths (the unicode square thingy), but only when the second frame is created. The second frame gets an identical treatment in the hook. Again, all these issues disappear if I set the default font for all frames at least once, and looks like I can set _any_ font. This seems to trigger some sort of one-time setup.