[teklib-general] changeset in /hg/teklib/current: Fixed textsize and xft/drawtext

Timm S. Mueller tmueller at neoscientists.org
Mon Nov 26 16:24:54 CET 2007


changeset f174c8796ea0 in /hg/teklib/current
details: http://teklib.org:8001/hg/teklib/current?cmd=changeset;node=f174c8796ea0
description:
	Fixed textsize and xft/drawtext

diffs (24 lines):

diff -r 7a1603373d6e -r f174c8796ea0 src/display_x11/display_x11_api.c
--- a/src/display_x11/display_x11_api.c	Wed Sep 26 18:12:04 2007 +0200
+++ b/src/display_x11/display_x11_api.c	Wed Sep 26 21:12:56 2007 +0200
@@ -584,7 +584,7 @@ x11_drawtext(TMOD_X11 *mod, struct TVReq
 			TINT w = x11_hosttextsize(mod, v->curfont, text);
 
 			(*mod->x11_xftiface.XftDrawRect)(v->draw, &bgpen->xftcolor,
-							x-1, y-1, w+2, f->height+2);
+							x, y, w, f->height);
 
 			(*mod->x11_xftiface.XftDrawStringUtf8)(v->draw, &fgpen->xftcolor,
 				f, x, y + f->ascent, (FcChar8 *)text, len);
diff -r 7a1603373d6e -r f174c8796ea0 src/display_x11/display_x11_font.c
--- a/src/display_x11/display_x11_font.c	Wed Sep 26 18:12:04 2007 +0200
+++ b/src/display_x11/display_x11_font.c	Wed Sep 26 21:12:56 2007 +0200
@@ -1125,7 +1125,7 @@ x11_hosttextsize(TMOD_X11 *mod, TAPTR fo
 		XGlyphInfo extents;
 		(*mod->x11_xftiface.XftTextExtentsUtf8)(mod->x11_Display, fn->xftfont,
 			(FcChar8 *)text, strlen(text), &extents);
-		len = extents.xOff + 2; /* why not extents.width?!? */
+		len = extents.xOff; /* why not extents.width?!? */
 	}
 	else
 		len = XTextWidth(fn->font, text, strlen(text));


More information about the teklib-general mailing list