diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/Image.c | 14 | ||||
-rw-r--r-- | generic/Text.c | 2 |
2 files changed, 12 insertions, 4 deletions
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; diff --git a/generic/Text.c b/generic/Text.c index 67ef520..b9b9986 100644 --- a/generic/Text.c +++ b/generic/Text.c @@ -659,7 +659,7 @@ ComputeCoordinates(ZnItem item, } /* ISSET(item->inv_flags, INV_TEXT_LAYOUT) */ text->height = font_height; - if (text->text_info && text->max_width) { + if (text->text_info) { unsigned int h, cursor_offset; int cursor_line; ZnPoint origin, box[4]; |