On Tue, Aug 30, 2022 at 11:42:33AM +0900, Pontus Stenetorp wrote:
> My intuition is that it is related to font loading and fall backs, so
> I am tempted to take a stab at it by comparing the font
> loading/handling between tabbed, dwm, st, and sent to see if I can
> spot any difference, as the latter three have no issues. If I am
> correct, it should not be an awfully difficult patch.
The font fallback in dwm and dmenu is handled via libsl (i.e drw.c) and
it's a huge mess [0].
The way it works is also very inefficient (it calls XftFontMatch() for
every single "unknown" code-point). The `nomatches` cache is merely
there to stop the bleeding and is not really a proper fix.
I wasn't very happy with the situation and had intended to rework the
system to be something more simple, sensible and efficient. But I'm not
sure if what I have planned is even possible with Xft/FontConfig or not.
And quickly grepping through the function list wasn't that helpful. I'll
probably have to allocate more time to read the docs properly.
But in any case I absolutely do NOT recommend trying to replicate drw's
approach. Not sure what ST is doing, so that might be worth taking a
look into instead.
[0]:
https://git.suckless.org/libsl/file/drw.c.html#l251
- NRK
Received on Tue Aug 30 2022 - 16:08:21 CEST