Add function returning the true string length in pixels.
May be called from outside of x11.c.
This commit is contained in:
parent
e5e019c6ce
commit
90c59ec39e
|
|
@ -1225,6 +1225,15 @@ Xget_str_length(char *text, int* wlen, int* wheight, XftFont* gfont, char* fonam
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* get the length of an utf-8 string in pixels */
|
||||
int
|
||||
X11_GetLenStr(GRAPH *gr, char* instring)
|
||||
{
|
||||
int wl, wh;
|
||||
Xget_str_length(instring, &wl, &wh, NULL, DEVDEP(gr).fname, DEVDEP(gr).fsize);
|
||||
return wl;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
int x11_dummy_symbol;
|
||||
|
|
|
|||
Loading…
Reference in New Issue