aboutsummaryrefslogtreecommitdiff
path: root/generic/Image.c
diff options
context:
space:
mode:
authorlecoanet2007-04-26 09:16:09 +0000
committerlecoanet2007-04-26 09:16:09 +0000
commit6c8d08abed06aecbbd742089a126520df46081ef (patch)
treee829a47c9462e2f8b3153899e2aea29b7aaf1445 /generic/Image.c
parent7c5d00a56e62284cd53a21b45e7cff0e570903d3 (diff)
downloadtkzinc-6c8d08abed06aecbbd742089a126520df46081ef.zip
tkzinc-6c8d08abed06aecbbd742089a126520df46081ef.tar.gz
tkzinc-6c8d08abed06aecbbd742089a126520df46081ef.tar.bz2
tkzinc-6c8d08abed06aecbbd742089a126520df46081ef.tar.xz
Fix a missing cursor in an empty text item
Diffstat (limited to 'generic/Image.c')
-rw-r--r--generic/Image.c14
1 files changed, 11 insertions, 3 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;