I've been trying to get into lower-level programming with fonts, particularly for interactive use, but it's been difficult to navigate the documentation. A lot of it is unfortunately outdated or full of broken links, since the lower-level libraries are ancient
.
My understanding is that for X11, the stack is basically:
- fontconfig for locating fonts that match a pattern.
- freetype is the basic glyph rasterization library.
- cairo, on top of freetype, is a cross-platform abstract API for consistent rendering results.
- HarfBuzz parses text and feeds cairo the positions each glyph should be rendered.
- Pango splits the input text into "runs" of the same script, language, and directionality, to feed to HarfBuzz.
- At the top of the stack, lots of software like Gtk and Qt are built on Pango.
My question is this: how does this translate to Wayland? There's not as much written for Wayland as for X. I know Gtk and Qt work on Wayland, but the dependencies for each display server may be different. I couldn't tell just by looking at their build scripts. I assumed that the software stacks would remain pretty much the same, but what really confuses me is that Cairo seems to have no target for Wayland. Cairo supports XCB and Xlib surfaces, whereas its support for EGL surfaces was removed in 2021, and EGL is what Wayland uses.
(Also, did I miss any other prominent libraries in the text rendering stack above?)
Thanks.