[Top][All Lists]

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

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

From: Julius Pfrommer
Subject: Unify the Platforms: Cairo+FreeType+Harfbuzz Everywhere (except TTY)
Date: Sun, 17 May 2020 12:41:25 +0200

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

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

reply via email to

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