--- hangul.c Tue Feb 3 19:13:36 1998 +++ hanterm/hangul.c Tue Feb 3 17:35:37 1998 @@ -220,11 +220,28 @@ else if( font_ks_mode == -1 ) #if !defined(NO_PATCH_HDRAWIMAGESTRING_BUG) /* by hanmaum 1998.2.2 */ { +#if defined(NO_PATCH_HDRAWIMAGESTRING_FILL) /* by hanmaum 1998.2.3 */ static XChar2b buf2[TEXT_BUF_SIZE]; register int i; int hlen = (p-str)/2; +/* static variable has zeros initially. for (i = 0; i < hlen; i++) buf2[i].byte1 = buf2[i].byte2 = 0; +*/ XDrawImageString16(d, w, hgc, x, y, buf2, hlen); +#else + int width, ascent, descent; + + width = (p - str) * FontWidth(screen); + ascent = (screen->ascent > screen->fnt_hangul->ascent) + ? screen->ascent : screen->fnt_hangul->ascent; + descent = (screen->descent > screen->fnt_hangul->descent) + ? screen->descent : screen->fnt_hangul->descent; + + XGetGCValues(d, hgc, GCBackground, &values); + XSetForeground(d, fillgc, values.background); + XFillRectangle(d, w, fillgc, x, y - ascent, + width, ascent + descent); +#endif XDrawString16(d, w, hgc, x, y, buf, n); } #else @@ -255,6 +272,9 @@ XDrawString16(d, w, hgc, x, y, buf, n); #endif width = (p - str) * FontWidth(screen); +#if !defined(NO_PATCH_HDRAWIMAGESTRING_FILL) /* by hanmaum 1998.2.3 */ + if (font_ks_mode != -1) { +#endif if (screen->ascent > screen->fnt_hangul->ascent) { XGetGCValues(d, hgc, GCBackground, &values); XSetForeground(d, fillgc, values.background); @@ -270,6 +290,9 @@ screen->descent - screen->fnt_hangul->descent); } +#if !defined(NO_PATCH_HDRAWIMAGESTRING_FILL) /* by hanmaum 1998.2.3 */ + } +#endif } else { for (p = str; len > 0 && !(*p & 0x80); p++, len--)