From 6c8d08abed06aecbbd742089a126520df46081ef Mon Sep 17 00:00:00 2001 From: lecoanet Date: Thu, 26 Apr 2007 09:16:09 +0000 Subject: Fix a missing cursor in an empty text item --- generic/Image.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'generic/Image.c') diff --git a/generic/Image.c b/generic/Image.c index b354332..18b2f65 100644 --- a/generic/Image.c +++ b/generic/Image.c @@ -1157,7 +1157,7 @@ SuckGlyphsFromServer(ZnWInfo *wi, #endif ZnGLContextEntry *ce = ZnGetGLContext(wi->dpy); - /*printf("loading a font \n");*/ + //printf("loading a font \n"); Tk_GetFontMetrics(txf->tkfont, &fm); #ifndef PTK_800 txf->num_glyphs = Tcl_NumUtfChars(ZnDefaultCharset, strlen(ZnDefaultCharset)); @@ -1253,8 +1253,8 @@ SuckGlyphsFromServer(ZnWInfo *wi, } txf->tex_width = tex_width; txf->tex_height = tex_height; - /*printf("(%s) Texture size is %d x %d for %d chars (max size: %d)\n", - Tk_NameOfFont(font), txf->tex_width, txf->tex_height, txf->num_glyphs, ce->max_tex_size);*/ + //printf("(%s) Texture size is %d x %d for %d chars (max size: %d)\n", + // Tk_NameOfFont(txf->tkfont), txf->tex_width, txf->tex_height, txf->num_glyphs, ce->max_tex_size); /* * Now render the font bits into the texture. @@ -1689,7 +1689,11 @@ ZnGetFontIndex(ZnTexFontInfo tfi, * It is possible to index the points below 127. Unicode * is the same as ascii down there. */ +#ifdef PTK_800 + return c - 1; +#else return c - 32; +#endif } /* @@ -1700,7 +1704,11 @@ ZnGetFontIndex(ZnTexFontInfo tfi, if (!tgvi) { return -1; } +#ifdef PTK_800 + min = 127 - 1; +#else min = 127 - 32; +#endif max = txf->num_glyphs; while (min < max) { mid = (min + max) >> 1; -- cgit v1.1