`XftTextExtentsUtf8` does not change `(XGlyphInfo*)extents` when string is of length zero.
First all, thanks for the hard work and the library!
As per the documentation of XftTextExtentsUtf8
(taken from here)
XftTextExtentsUtf8 computes the pixel extents on display dpy of no more than len bytes of a UTF-8 encoded string when drawn with font, storing them in extents. The XGlyphInfo data type is defined by the X Rendering Extension library.
My interpretation of this is that when the variable string
is equal to ""
, then the function should "calculate" the length on pixels that the string is going to take on screen, which is zero, and set it to extents
(of type XGlyphInfo*
).
Currently, it just returns without changing extends
. Maybe my interpretation is wrong, but in that case, I would argue to make it explicit in the documentation.
Edited by Suavesito