[hackers] Announcing libschrift (a TrueType font rendering library)

From: Thomas Oltmann <thomas.oltmann.hhg_AT_gmail.com>
Date: Sun, 19 Apr 2020 16:47:24 +0200

Hello everybody.

Last year at slcon6, I demo'd a toy TrueType font renderer (*) to a
couple people.
Someone there suggested it'd be really useful to have this as a proper
library for suckless projects to use,
and so after a complete rework to make it actually usable, I'm finally
able to release it under the name libschrift!
You can find it here: https://www.github.com/tomolt/libschrift

What you'll notice is that, similar to other font rendering libraries,
libschrifts API is very low-level;
In future, I'll probably write a wrapper library that abstracts away
most of this.
For right now, there's at least an example/demo application called sftdemo.
sftdemo shows how to use libschrift to render text to an X11 window
completely without Xft or FreeType2.
To do this, sftdemo uses the same underlying interface that Xft is
also built upon.

Still, you shouldn't use libschrift for anything serious quite yet.
Most notably, compound glyph support is still missing,
so some characters like Umlauts or accents will likely not work yet.

As a proof of concept, I might at some point write a patch for dmenu
(or something like it)
that replaces all of its Xft / FreeType2 usage with libschrift.

I can keep you all posted if you're interested.

Cheers,
          Thomas Oltmann


(*) For those wo don't know, a font renderer handles the low-level
parts of displaying text.
That entails parsing font files and using them to draw characters into
bitmaps at runtime, which can then be displayed on the screen.
Currently, all suckless applications (and in fact most applications in
general) use FreeType2 for this, mostly via a wrapper API called Xft.
Received on Sun Apr 19 2020 - 16:47:24 CEST

This archive was generated by hypermail 2.3.0 : Sun Apr 19 2020 - 19:48:35 CEST