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: Fri, 14 Jun 2019 13:52:28 +0200 Message-ID: References: <83tvd1p4jm.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="196665"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Eli Zaretskii , emacs-devel@gnu.org To: YAMAMOTO Mitsuharu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 14 14:00:41 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 1hbksq-000ozv-Ah for ged-emacs-devel@m.gmane.org; Fri, 14 Jun 2019 14:00:40 +0200 Original-Received: from localhost ([::1]:50488 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbksp-0004mo-6N for ged-emacs-devel@m.gmane.org; Fri, 14 Jun 2019 08:00:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47429) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hbklC-00085b-D7 for emacs-devel@gnu.org; Fri, 14 Jun 2019 07:52:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hbklA-0004Lz-Pq for emacs-devel@gnu.org; Fri, 14 Jun 2019 07:52:46 -0400 Original-Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]:53008) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hbklA-0004Cm-Ij; Fri, 14 Jun 2019 07:52:44 -0400 Original-Received: by mail-wm1-x32c.google.com with SMTP id s3so2053708wms.2; Fri, 14 Jun 2019 04:52:32 -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:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=eK5CKOWyxEbxm/oDr6SMsZIEVPzq+npig88RLxmNCow=; b=ZclAIUqMW89hMwRTnRmi9V9Y/7c8ETgjs9RmjFBjRHZQm/QINPtsG+lC8wkYugd9c8 X+6tD8dFfngcgsuSRRvDvWwygFauvfNPmevpWfCjaJRhi6+9qrqrd/sUbCmQcprRX3y4 7+p05NEmoedfQGgIsbvIcWVbCimVI7ENn9xNIw6qfe0RsB7pclY/X0lmc+xusCFsqhMD XRrjN6Gfi71nfRjCNPMo8HuM5klYyx6b5KiogUq3WxCcLt2P0YY6sQ1ouYaWSVm++fn8 MzRym3qbbtijTOKKzKVvfMw36Y2gpgXg8zbo9Kbv6YsXC5rj08fuuLyqSekvxnLAcOC0 NwFA== 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:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=eK5CKOWyxEbxm/oDr6SMsZIEVPzq+npig88RLxmNCow=; b=HGNWGdF6KjQbtWXiHl3Q5Y04l1fipgD+p7k7W6fhbQ8SkGIlb5j6NI5cgUINXU0ok7 jQ34IY6jqNWwbl08ooYnK7f4yigxpKCU6LyU25GqnVUGD4zYTF1HGJZttRUeQpCgLsJS 1gUOTLeVEuI6GDEa1RK8YHPnkF7sh9sA5Rr117i4bay6C8JlDDfbV063KNJfb95eKzAJ zXkjmtE50XuZGxXGx2Toz/iw82tNMx6UlOnwSMEwwS2jNTkWA0GB8uqyRAn+7OATFwDB DRQDklhS0fY1xDznZF0RzolET8ZJ3tZs3iTyzzXar/rHuN9kUADjs5rxOLdxKYdC0/LC c4GA== X-Gm-Message-State: APjAAAXsf5BE7cFA9MRA+cLCuxht0ez3zdQFcM0vt3ZJYg97MzFOj7UN +cTvz7RNhBTSOGiQ0SPAnj0xJgv2vAY= X-Google-Smtp-Source: APXvYqxe9esij8QAyJk9fWmDkpRvPjnucW1Yxhz6OyiMa3S/lLfMUUCTMRjIRT/u+sp41uG8LQ7ioA== X-Received: by 2002:a05:600c:2189:: with SMTP id e9mr7253353wme.56.1560513150453; Fri, 14 Jun 2019 04:52:30 -0700 (PDT) Original-Received: from rpluim-mac ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id y2sm2631473wra.58.2019.06.14.04.52.29 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 14 Jun 2019 04:52:29 -0700 (PDT) Mail-Followup-To: emacs-devel@gnu.org Mail-Copies-To: never Gmane-Reply-To-List: yes In-Reply-To: (YAMAMOTO Mitsuharu's message of "Fri, 14 Jun 2019 19:52:07 +0900") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32c 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:237595 Archived-At: >>>>> On Fri, 14 Jun 2019 19:52:07 +0900, YAMAMOTO Mitsuharu said: YAMAMOTO> On Sat, 08 Jun 2019 04:40:45 +0900, YAMAMOTO> Eli Zaretskii wrote: >>=20 >> The question is how to implement this preference. In the code that = is >> currently on master, you will see one way of implementing it in >> w32fns.c, where the Windows code creates GUI frames (look in >> x-create-frame). Basically, after determining whether Uniscribe was >> explicitly requested, this implementation registers or doesn't >> register Uniscribe for each new frame. This means the backends to be >> available to a frame must be specified at frame creation time, or be >> known by that time. >>=20 >> Yamamoto-san suggested a slightly different way of implementing the >> same idea; I will let him explain his proposal in more detail. YAMAMOTO> Attached is my proposal. The idea is to register all the dri= vers in YAMAMOTO> x-create-frame as before, but tweak the function font_update_= drivers YAMAMOTO> (in font.c) so it only chooses "unsuperseded" drivers if the = user did YAMAMOTO> not explicitly specify font backends (i.e., if NEW_DRIVERS is= t). YAMAMOTO> Unlike Eli's current code in w32fns.c, this leaves the room t= o change YAMAMOTO> the font backend from uniscribe to harfbuzz (and vice versa) = for the YAMAMOTO> same frame. (You can't change xft/frcr to xfthb/ftcrhb on X YAMAMOTO> regardless of this patch because Bug#23386). Whilst such an ability to change font backends is cool, I really don=CA=BCt see it being very much used: as I said in my other message, in the long term only the HarfBuzz backend will be supported, so I don=CA=BCt see any need to add such infrastructure. Robert