Re: [DEVEL] XftTextExtents8 function and spaces characters

2019-04-24 Thread Lucien Gentis
Hi, Thanks for your answer. As I have to know exact width of the string, I found that solution : For every font I use, I calculate the width of a space. And every time I use XftTextExtents8, I test if the last character of the string is a space or not. If it's a space, I add the width of th

Re: [DEVEL] XftTextExtents8 function and spaces characters

2019-04-24 Thread walter harms
Hi, i did not see an answer so i will try: The docu says: "XftTextExtents8 computes the pixel extents of "string" when drawn with "font". " IMHO: the point here is: "pixel extents" i read "find the last pixel" white space has no pixel so it should be ignored. In that logic leading spaces get not

[DEVEL] XftTextExtents8 function and spaces characters

2019-04-13 Thread Lucien Gentis
Hello, I use  XftTextExtents8 (display,font,(FcChar8 *)str,strlen(str),&glyphInfo); instruction to compute width of string str Here are values of glyphInfo.width with following strings: String                glyphInfo.width - "e"                    9 " e" (