From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.devel Subject: Re: When and how to register various font backends Date: Mon, 17 Jun 2019 11:41:00 +0200 Message-ID: References: <83tvd1p4jm.fsf@gnu.org> <83blz0xsu5.fsf@gnu.org> <835zp8xlzo.fsf@gnu.org> <83d0jfw528.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="220531"; mail-complaints-to="usenet@blaine.gmane.org" Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jun 17 11:42:11 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hco9S-000vEz-52 for ged-emacs-devel@m.gmane.org; Mon, 17 Jun 2019 11:42:10 +0200 Original-Received: from localhost ([::1]:45604 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hco9R-0006wK-7P for ged-emacs-devel@m.gmane.org; Mon, 17 Jun 2019 05:42:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58403) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hco8b-0006ev-6P for emacs-devel@gnu.org; Mon, 17 Jun 2019 05:41:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hco8S-00029A-5W for emacs-devel@gnu.org; Mon, 17 Jun 2019 05:41:10 -0400 Original-Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:45521) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hco8O-00026k-4e; Mon, 17 Jun 2019 05:41:04 -0400 Original-Received: by mail-ed1-x52d.google.com with SMTP id a14so15180378edv.12; Mon, 17 Jun 2019 02:41:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:mail-followup-to:mail-copies-to :gmane-reply-to-list:date:message-id:mime-version :content-transfer-encoding; bh=/lpJCZYasZd6Z/Q0fLY8hwLiewivJqFIKM/qta+bHzQ=; b=BtzfXoRKoGGqtyqcingzDSEPoDVanPjNQe95lAErJeLA8e6sGK+89M8ku8xgnfdW6V 6nBWqcakai65d2SpysGYS1ok9YwB1y6JuSu/YmSaVv7DJ6ojdg2l5tla+v8ThoiLPHw9 AC63KkvxvIfLN/GPZH9gmhiPoqhJ0HQno1hyCoi/GS9RpyCrrjxecfujbNp5dxKGNPPH l2wMg6hfVrB0NDtEYSgqv5m8RBYq1UkNbyv4N7SdSaygFa/owjlwPT2SO0rnrjnGJ+4S BcScEfUZWmD8Mf3G91K9q+NioEBS/TA7biBc6nhmMKsuNd+/6OQm0LWo+78OmfgQ9vEk kjPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:mail-followup-to :mail-copies-to:gmane-reply-to-list:date:message-id:mime-version :content-transfer-encoding; bh=/lpJCZYasZd6Z/Q0fLY8hwLiewivJqFIKM/qta+bHzQ=; b=pPww9CeY/SarjuSBTaX/4Ec7L3XxXSxUUnymw/eMATRbo6lWDzsi65L9TRZKguhFun 3NbJ0oCXLjuNpzlDEZoeJpqlyMVrbuLyNIFxWeSrfiO+U8BNYs9q04toJiM/aBv/zz8O chN/zcKWSR4KEovVLh536A7vweFYrKRhttQsZ6iJMNQPyj0cSuuVc3ihKi2J1xO6Xt9f LcYuoVOtO6k/ShE/iP13/YrSI37lyIJgbDTHay9BxoQnSA3mbTbnhsVn+EndDo1316BW Dt3ruxNItziJLLDW50/4E0bKJgeqvI+zh9hRhPUFTGtqacYDEeg4IhHGRfxn/KT6fgIJ L77Q== X-Gm-Message-State: APjAAAUc5m46kssgPyyVUFtT3Ct7OkwufoPnmGKn/o1K2kkd4ogpoq9k ygEKCC7DFIdM/7Q7tnSqJTRXwHQRxnw= X-Google-Smtp-Source: APXvYqxY2kN9v9U/0Q/xgr7NEAKqAanoyXiWvc1Ye2FyGn4VytANAogyZe52uc4CXBDArE63u2WkUQ== X-Received: by 2002:a17:907:2114:: with SMTP id qn20mr77094406ejb.138.1560764462098; Mon, 17 Jun 2019 02:41:02 -0700 (PDT) Original-Received: from rpluim-mac ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id x21sm1469509edb.0.2019.06.17.02.41.00 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 17 Jun 2019 02:41:01 -0700 (PDT) Mail-Followup-To: emacs-devel@gnu.org Mail-Copies-To: never Gmane-Reply-To-List: yes X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::52d X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:237770 Archived-At: >>>>> On Sat, 15 Jun 2019 12:50:23 +0300, Eli Zaretskii said: >> Date: Fri, 14 Jun 2019 17:47:07 +0300 >> From: Eli Zaretskii >> Cc: emacs-devel@gnu.org >>=20 >> > (add-to-list 'default-frame-alist '(font-backend xft x)) works alr= eady, no? And >> > presumably continues to work with your solution. >>=20 >> No, it doesn't work with my solution, at least not reliably, because= I >> didn't intend it to work. Eli> But what about being able to specify the backend(s) via Eli> default-frame-alist in the init file, and expecting that to affect= all Eli> the frames including the initial one? Mitsuharu's proposal allows Eli> that, whereas mine doesn't. That's because in my implementation t= he Eli> font backend is registered at frame creation time, and only the Eli> backends known to be requested at that time are registered. So wh= en Eli> we call modify-frame-parameters later, after processing the init f= ile, Eli> to make default-frame-alist parameters take effect, you cannot req= uest Eli> a backend that wasn't registered. Eli> By contrast, Mitsuharu's method registers all the backends, but on= ly Eli> activates some of them. So modify-frame-parameters can work, beca= use Eli> it just needs to activate an already registered backend. I see. I guess one potential fix would be to change the default value of default-frame-alist, but that wouldn=CA=BCt help people who have already customised it. So it seems that Mitsuharu's proposal is the only one that fulfills all your requirements. Robert