XDrawString

Russell Shaw rjshaw at netspace.net.au
Thu Dec 15 23:35:27 PST 2005


Hi,

To draw strings aligned with a left margin, should i use x=0:

   char *string;
   ...
   XDrawString(display, window, gc, 0, y, string, strlen(string));

or am i supposed to use lbearing? :

   XFontStruct *font;
   ...

   int x = font->per_char[(int)str[0]].lbearing;

   XDrawString(display, window, gc, -x, y, string, strlen(string));



More information about the xorg mailing list