[teklib-general] changeset in /hg/teklib/current: added debug outut

Franciska Schulze fschulze at neoscientists.org
Mon Nov 26 16:23:36 CET 2007


changeset 666b19d84def in /hg/teklib/current
details: http://teklib.org:8001/hg/teklib/current?cmd=changeset;node=666b19d84def
description:
	added debug outut

diffs (104 lines):

diff -r c273befab5a9 -r 666b19d84def src/visual/posix/visual_font.c
--- a/src/visual/posix/visual_font.c	Mon Sep 17 19:15:22 2007 +0200
+++ b/src/visual/posix/visual_font.c	Mon Sep 17 20:08:49 2007 +0200
@@ -391,6 +391,8 @@ vis_hostopenfont(TMOD_VIS *mod, TTAGITEM
 {
 	TAPTR font = TNULL;
 	GLOBAL *g = mod->vis_HostGlobal;
+
+	printf("%s\n", __FUNCTION__);
 
 	if (g->use_xft == TTRUE)
 		font = hostopenfont_xft(mod, tags);
@@ -758,6 +760,7 @@ setfont(TMOD_VIS *mod, TAPTR font)
 	VISUAL *v = mod->vis_HostVisual;
 	GLOBAL *g = mod->vis_HostGlobal;
 
+	printf("%s\n", __FUNCTION__);
 	if (font)
 	{
 		if (!g->use_xft)
@@ -835,6 +838,8 @@ vis_hostclosefont(TMOD_VIS *mod, TAPTR f
 	GLOBAL *g = mod->vis_HostGlobal;
 	struct FontNode *fn = (struct FontNode *) font;
 	TAPTR exec = TGetExecBase(mod);
+
+	printf("%s\n", __FUNCTION__);
 
 	TExecLock(exec, g->lock);
 
diff -r c273befab5a9 -r 666b19d84def src/visual/posix/visual_host.c
--- a/src/visual/posix/visual_host.c	Mon Sep 17 19:15:22 2007 +0200
+++ b/src/visual/posix/visual_host.c	Mon Sep 17 20:08:49 2007 +0200
@@ -160,8 +160,9 @@ drawtext1(TMOD_VIS *mod, VISUAL *v, TINT
 	if (g->use_xft == TTRUE)
 	{
 		XftFont *f = ((struct FontNode *) v->curfont)->xftfont;
-		(*g->xftiface.XftDrawStringUtf8)(v->draw, &v->xftwhite, f, x, y + f->ascent,
- 			(FcChar8 *)text, len);
+		if (v->draw && f)
+			(*g->xftiface.XftDrawStringUtf8)(v->draw, &v->xftwhite, f, x, y + f->ascent,
+ 				(FcChar8 *)text, len);
 	}
 	else
 	{
@@ -483,18 +484,6 @@ getattrfunc(struct THook *hook, TAPTR ob
 			break;
 		case TVisual_WinTop:
 			*((TINT *) item->tti_Value) = v->wintop;
-			break;
-		case TVisual_TextWidth:
-			*((TINT *) item->tti_Value) = v->textwidth;
-			break;
-		case TVisual_TextHeight:
-			*((TINT *) item->tti_Value) = v->textheight;
-			break;
-		case TVisual_FontWidth:
-			*((TINT *) item->tti_Value) = v->fontwidth;
-			break;
-		case TVisual_FontHeight:
-			*((TINT *) item->tti_Value) = v->fontheight;
 			break;
 		case TVisual_MinWidth:
 			*((TINT *) item->tti_Value) = v->sizehints->min_width;
@@ -1074,8 +1063,8 @@ vis_init(TMOD_VIS *mod)
 
 			if (i == LIBXFT_NUMSYMS)
 			{
-				/*g->use_xft = TTRUE;
-				TDBPRINTF(10, ("libXft successfully initialised\n"));*/
+				g->use_xft = TTRUE;
+				TDBPRINTF(10, ("libXft successfully initialised\n"));
 			}
 			else
 			{
diff -r c273befab5a9 -r 666b19d84def src/visual/posix/visual_host.h
--- a/src/visual/posix/visual_host.h	Mon Sep 17 19:15:22 2007 +0200
+++ b/src/visual/posix/visual_host.h	Mon Sep 17 20:08:49 2007 +0200
@@ -28,8 +28,6 @@ typedef struct
 
 	TINT winwidth, winheight;
 	TINT winleft, wintop;
-	TINT fontwidth, fontheight;
-	TINT textwidth, textheight;
 	TSTRPTR title;
 
 	TUINT flags;
diff -r c273befab5a9 -r 666b19d84def src/visual/tests/fonts.c
--- a/src/visual/tests/fonts.c	Mon Sep 17 19:15:22 2007 +0200
+++ b/src/visual/tests/fonts.c	Mon Sep 17 20:08:49 2007 +0200
@@ -86,11 +86,11 @@ TVOID fonttest(TAPTR v, TVPEN *pentab)
 		ftags[0].tti_Value = (TTAG) "utopia";
 		ftags[1].tti_Tag = TVisual_FontPxSize;
 		ftags[1].tti_Value = (TTAG) 32;
-		ftags[2].tti_Tag = TVisual_FontItalic;
+/*		ftags[2].tti_Tag = TVisual_FontItalic;
 		ftags[2].tti_Value = (TTAG) TFALSE;
 		ftags[3].tti_Tag = TVisual_FontBold;
-		ftags[3].tti_Value = (TTAG) TTRUE;
-		ftags[4].tti_Tag = TTAG_DONE;
+		ftags[3].tti_Value = (TTAG) TTRUE;*/
+		ftags[3].tti_Tag = TTAG_DONE;
 		cfont = TVisualOpenFont(v, ftags);
 #endif
 


More information about the teklib-general mailing list