Browse Source

Add function returning the true string length in pixels.

May be called from outside of x11.c.
pre-master-46
Holger Vogt 9 years ago
parent
commit
c9edc6fcb3
  1. 9
      src/frontend/plotting/x11.c

9
src/frontend/plotting/x11.c

@ -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…
Cancel
Save