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.devel Subject: Re: Incorrect font weight selected Date: Sun, 19 Dec 2021 14:46:43 +0200 Message-ID: <83lf0g92z0.fsf@gnu.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> <87fsqog7ep.fsf@wavexx.thregr.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3442"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Yuri D'Elia Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 19 13:48:46 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 1myvcK-0000ig-Mi for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Dec 2021 13:48:44 +0100 Original-Received: from localhost ([::1]:57370 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1myvcJ-0006sq-Nb for ged-emacs-devel@m.gmane-mx.org; Sun, 19 Dec 2021 07:48:43 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myvaX-0005kO-F8 for emacs-devel@gnu.org; Sun, 19 Dec 2021 07:46:53 -0500 Original-Received: from [2001:470:142:3::e] (port=60866 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 1myvaW-0005h2-Gm; Sun, 19 Dec 2021 07:46:52 -0500 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=li/Pt7+ib2BtbjTS5VqeZInHM+tE9XiCEdHOpaTIZEM=; b=nBNVE2dzJllb qyZsVVppKbvrDihsqY+Rx4bucp+frseYT0RctPk+1cnVk0/VLrkEZsVv/sjK9bimtlLTYrWQjYCnl huV+rYnUYS1+hW/cW0gmu5T++rTelzVFCVcY2VsmaPjbMcPq7xFGR9WTwKYq2AAS2/zw1Kk4zl/uu 836EwAJi41lHA3wo2lMBIzyN5I/o7WAB5xSWU8gYnFlaRv59e01irsq/HTF5Bs05TpCq2VmXLnxVr Ofz5VJlWrh5Fj5pJO5LZ/10RqN03dvr2pPVhpDZ8TeJOMg45bOuNF4Q65BqYjmoDyw7stEhpbETDy uWOCyhEZVFsF1AbtMsyNcQ==; Original-Received: from [87.69.77.57] (port=3957 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 1myvaW-0001wv-0c; Sun, 19 Dec 2021 07:46:52 -0500 In-Reply-To: <87fsqog7ep.fsf@wavexx.thregr.org> (message from Yuri D'Elia on Sun, 19 Dec 2021 12:14:28 +0100) 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:282422 Archived-At: > From: Yuri D'Elia > Cc: emacs-devel@gnu.org > Date: Sun, 19 Dec 2021 12:14:28 +0100 > > 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. No, AFAIK font selection happens as soon as Emacs processes the set-face-attribute call (or its equivalent) which sets the font or its family for the default face. > 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. I'm not sure, after reading this, whether or not you found a satisfactory solution, but if you are still looking for a hook to run this kind of customization, you may wish trying emacs-startup-hook and window-setup-hook.