From 141ce091298a1364e2f6f56f71ad751931120188 Mon Sep 17 00:00:00 2001 From: Karl Ramm Date: Mon, 20 Apr 2009 23:51:04 +0000 Subject: Transliterate to UTF-16 and use XDrawText16. This leaves vast font issues, and selection issues, and bypasses #6 in favor of #33. --- zwgc/X_gram.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'zwgc/X_gram.c') diff --git a/zwgc/X_gram.c b/zwgc/X_gram.c index e486835..8b5d96a 100644 --- a/zwgc/X_gram.c +++ b/zwgc/X_gram.c @@ -431,7 +431,7 @@ x_gram_draw(Display *dpy, Window w, x_gram *gram, Region region) GC gc; XGCValues gcvals; xblock *xb; - XTextItem text; + XTextItem16 text; int startblock, endblock, startpixel = 0, endpixel = 0; gc = XCreateGC(dpy, w, 0, &gcvals); @@ -502,11 +502,11 @@ x_gram_draw(Display *dpy, Window w, x_gram *gram, Region region) if (XRectInRegion(region, xb->x1, xb->y1, xb->x2 - xb->x1, xb->y2 - xb->y1) != RectangleOut) { SetFG(dpy, gc, gram->bgcolor ^ xb->fgcolor); - text.chars = gram->text + xb->strindex; - text.nchars = xb->strlen; + text.chars = (XChar2b *)xb->wstr; + text.nchars = xb->wlen / 2; text.delta = 0; text.font = xb->fid; - XDrawText(dpy, w, gc, xb->x, xb->y, &text, 1); + XDrawText16(dpy, w, gc, xb->x, xb->y, &text, 1); } } -- cgit v1.2.3