[dev] [ANNOUNCE] dtext-0.1: Font rendering library

From: Leo Gaspard <leo_AT_gaspard.io>
Date: Sat, 13 Feb 2016 20:03:13 +0100

Hi,

I'm happy to announce the first prerelease of dtext, a font rendering
library that tries to suck less:

    https://git.ekleog.org/dtext/

What it does:
 * Render a string to the screen, using any TTF or OTF font
 * Use any color
 * Fallback between configured fonts

What it does not (yet) do:
 * Replace FontConfig for fallback on non-configured fonts
 * Support multi-face fonts (every font I use has a single face)

What it relies on:
 * libX11 with XRENDER extension
 * FreeType

What I think still sucks (that's why it's a prerelease!):
 * The format of font names
 * Separation between ascent and height

For the format of font names, if one has a font setup with fallback he
wants to use on many programs, it means the font string has to be copied
everywhere... duplicating the configuration. Yet, just giving a path to
a config file would mean added code complexity for what could be
considered as a non-issue.

For the separation between ascent and height, I encountered the issue
with Fantasque Sans Mono, which has some characters with a huge ascent,
and this breaks the expected behaviour -- see examples/stupidterm.c: I
had to adjust both a vertical scale and an ascender scale to make it
look good. However, I haven't yet found how to design this properly,
given it is an issue intrinsic to font rendering: font rendering is made
relative to a baseline, like when people write by hand, while a computer
expects to have a well-sized bounding box.

Do you have an opinion as to how to solve these two issues?
What features do you think are missing or unneeded?

Comments and patches welcome,

Cheers,

Leo


Received on Sat Feb 13 2016 - 20:03:13 CET

This archive was generated by hypermail 2.3.0 : Sat Feb 13 2016 - 20:00:13 CET