Re: [hackers] [libsl|dmenu][PATCH v2] Fix truncation issues and improve performance

From: Stein Gunnar Bakkeby <>
Date: Sat, 26 Mar 2022 00:02:12 +0100


for the first patch, what was the incentive for making a call to drw_text
to draw the ellipsis rather than making another call to XftDrawStringUtf8?

As-is, and I am primarily thinking of the bar in dwm in this case, if you
were to have limited space and there is only enough space to write one or
two characters then you have a situation where the ellipsis would never
fit, but the text will overflow.

In this situation the ellipsis_w variable will remain 0 and drw_text is
called again with a width of 0 to draw the ellipsis. I believe it might
crash with that.

Also thinking out loud it would probably make sense to only draw the
ellipsis if the available width is at least 2 * ellipsis width.



On Fri, Mar 25, 2022 at 11:35 AM Quentin Rameau <> wrote:

> > Hi,
> Hi NRK,
> > Fixed a couple bugs/issues with the previous patches and attached the
> > amended ones. I'm confident that these patches shouldn't have any
> > remaining logic issues, but feel free to point them out in case there is.
> > Additionally, there's one *new* patch attached, which fixes the
> > performance issue in case we have no font match for a given codepoint.
> I haven't reviewed those (yet), but thanks for your work on this!
Received on Sat Mar 26 2022 - 00:02:12 CET

This archive was generated by hypermail 2.3.0 : Sun Mar 27 2022 - 20:12:37 CEST