From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Unify the Platforms: Cairo+FreeType+Harfbuzz Everywhere (except TTY) Date: Sun, 17 May 2020 17:35:12 +0300 Message-ID: <97C7EAB7-10AB-4702-ABC8-EB6C1C50ABDB@gnu.org> References: <20200517124125.000013a4@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="124796"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: K-9 Mail for Android To: emacs-devel@gnu.org,Julius Pfrommer Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 17 16:36:02 2020 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 1jaKOX-000WJg-UL for ged-emacs-devel@m.gmane-mx.org; Sun, 17 May 2020 16:36:01 +0200 Original-Received: from localhost ([::1]:32940 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaKOW-0001kq-VI for ged-emacs-devel@m.gmane-mx.org; Sun, 17 May 2020 10:36:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43252) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaKNr-0001KZ-1h for emacs-devel@gnu.org; Sun, 17 May 2020 10:35:19 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59966) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaKNq-00034H-Op; Sun, 17 May 2020 10:35:18 -0400 Original-Received: from [176.12.226.120] (port=57359 helo=[10.159.73.135]) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1jaKNp-0002Dy-JA; Sun, 17 May 2020 10:35:18 -0400 In-Reply-To: <20200517124125.000013a4@web.de> 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:250607 Archived-At: On May 17, 2020 1:41:25 PM GMT+03:00, Julius Pfrommer wrote: > Hi all, >=20 > during the recent discussion on "Emacs being too square", I recalled a > few projects that use OpenGL for terminal emulators [1,2]=2E With good > performance, smooth scrolling and the possibility to add more visual > *bling*=2E >=20 > I had a good look at Emacs' code-base to see if similar approaches > could be used=2E As you can imagine, I got lost in a forest of #ifdef > for > different platforms and GUI toolkits=2E The code looks scary to touch=2E > If > you don't have access to *all supported platform*, it is likely that > changes break a platform you could not test locally=2E >=20 > To make the code-base less scary, there should be more code-sharing > across GUI platforms=2E And this is indeed possible! >=20 > The GTK-based Emacs GUI can use Cairo for rendering=2E Cairo + FreeType > + > HarfBuzz (calling it CFH for simplicity) is available for the other > supported platforms as well (besides pure TTY): >=20 > - GnuSTEP [http://wiki=2Egnustep=2Eorg/index=2Ephp/Backend] > - Raw Xlib [https://www=2Ecairographics=2Eorg/Xlib/] > - Windows+MacOS [https://www=2Ecairographics=2Eorg/download/] >=20 > Big portions of the platform-specific GUI code could be unified based > on > the CFH libraries=2E Is a hard dependency on the CFH libraries > imaginable? >=20 > Maybe one of the platforms is a "low-hanging fruit" to get things > going=2E > As every major refactoring, there should be a series of small steps in > order to keep things stable=2E >=20 > Thank you for the hard work put into this amazing piece of software! >=20 > Regards, Julius >=20 > [1] https://sw=2Ekovidgoyal=2Enet/kitty/ > [2] https://github=2Ecom/alacritty/alacritty Any work in this direction is and always has been welcome=2E The practica= l problem with that is that you need to have access to all the supported pl= atforms to make sure the refactoring works=2E FWIW, I'm not sure I share your optimism regarding the Cairo way, I think = it requires something from the system as well, so it might be not so easy= =2E And the GUI toolkits are AFAIU a separate issue, not directly related to h= ow we draw to the glass=2E