Sujet : Re: Font support for utf8
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.unix.shellDate : 08. Jul 2025, 23:06:04
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <104k4oc$3p7d8$11@dont-email.me>
References : 1 2 3 4 5
User-Agent : Pan/0.162 (Pokrosvk)
On Tue, 8 Jul 2025 10:20:49 +0100, Richard Harnden wrote:
Actually, I wanted to detect whether the font that happens to be in use
(which I can't control) has a particular glyph available. I have no
problem choosing a suitable font for myself.
I thought that maybe there'd be some kind of ioctl call.
ioctl(2) calls are for device drivers, which are part of the kernel. What
you want is a call in the font APIs, which run entirely in userland.
On Linux systems, the two relevant subsystems would be Fontconfig and
FreeType. Fontconfig lets you query your system/user setup to find out
what fonts are available, and what their capabilities are. FreeType not
only takes care of low-level glyph rendering, it also lets you pry into
the innards of a particular font in more detail.