emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unify the Platforms: Cairo+FreeType+Harfbuzz Everywhere (except TTY)


From: Eli Zaretskii
Subject: Re: Unify the Platforms: Cairo+FreeType+Harfbuzz Everywhere (except TTY)
Date: Sun, 17 May 2020 17:35:12 +0300
User-agent: K-9 Mail for Android

On May 17, 2020 1:41:25 PM GMT+03:00, Julius Pfrommer <address@hidden> wrote:
> Hi all,
> 
> during the recent discussion on "Emacs being too square", I recalled a
> few projects that use OpenGL for terminal emulators [1,2]. With good
> performance, smooth scrolling and the possibility to add more visual
> *bling*.
> 
> I had a good look at Emacs' code-base to see if similar approaches
> could be used. As you can imagine, I got lost in a forest of #ifdef
> for
> different platforms and GUI toolkits. The code looks scary to touch.
> If
> you don't have access to *all supported platform*, it is likely that
> changes break a platform you could not test locally.
> 
> To make the code-base less scary, there should be more code-sharing
> across GUI platforms. And this is indeed possible!
> 
> The GTK-based Emacs GUI can use Cairo for rendering. Cairo + FreeType
> +
> HarfBuzz (calling it CFH for simplicity) is available for the other
> supported platforms as well (besides pure TTY):
> 
> - GnuSTEP [http://wiki.gnustep.org/index.php/Backend]
> - Raw Xlib [https://www.cairographics.org/Xlib/]
> - Windows+MacOS [https://www.cairographics.org/download/]
> 
> Big portions of the platform-specific GUI code could be unified based
> on
> the CFH libraries. Is a hard dependency on the CFH libraries
> imaginable?
> 
> Maybe one of the platforms is a "low-hanging fruit" to get things
> going.
> As every major refactoring, there should be a series of small steps in
> order to keep things stable.
> 
> Thank you for the hard work put into this amazing piece of software!
> 
> Regards, Julius
> 
> [1] https://sw.kovidgoyal.net/kitty/
> [2] https://github.com/alacritty/alacritty

Any work in this direction is and always has been welcome.  The practical 
problem with that is that you need to have access to all the supported 
platforms to make sure the refactoring works.

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.

And the GUI toolkits are AFAIU a separate issue, not directly related to how we 
draw to the glass.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]