--- rxvt-unicode/src/defaultfont.C 2004/02/24 00:44:23 1.24 +++ rxvt-unicode/src/defaultfont.C 2004/03/03 20:15:18 1.29 @@ -74,15 +74,18 @@ { CS_GB2312_1980_0, "xft:AR PL KaitiM GB" }, { CS_GB2312_1980_0, "xft:AR PL SungtiL GB" }, # endif - { CS_CNS11643_1992_1, "-*-*-*-*-*-*-*-*-*-*-c-*-gb2312*-0" }, - { CS_CNS11643_1992_1, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-1" }, - { CS_CNS11643_1992_2, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-2" }, - { CS_CNS11643_1992_3, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-3" }, - { CS_CNS11643_1992_4, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-4" }, - { CS_CNS11643_1992_5, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-5" }, - { CS_CNS11643_1992_6, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-6" }, - { CS_CNS11643_1992_7, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-7" }, - { CS_CNS11643_1992_F, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-f" }, + { CS_BIG5, "-*-*-*-*-*-*-*-*-*-*-c-*-big5-0" }, + { CS_BIG5_PLUS, "-*-*-*-*-*-*-*-*-*-*-c-*-big5p-0" }, + { CS_BIG5_EXT, "-*-*-*-*-*-*-*-*-*-*-c-*-big5.eten-0" }, + { CS_CNS11643_1992_1, "-*-*-*-*-*-*-*-*-*-*-c-*-gb2312*-0" }, + { CS_CNS11643_1992_1, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-1" }, + { CS_CNS11643_1992_2, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-2" }, + { CS_CNS11643_1992_3, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-3" }, + { CS_CNS11643_1992_4, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-4" }, + { CS_CNS11643_1992_5, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-5" }, + { CS_CNS11643_1992_6, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-6" }, + { CS_CNS11643_1992_7, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-7" }, + { CS_CNS11643_1992_F, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-f" }, #endif #if XFT @@ -100,6 +103,7 @@ ///////////////////////////////////////////////////////////////////////////// +#if XFT rxvt_drawable::~rxvt_drawable () { if (xftdrawable) @@ -113,6 +117,7 @@ return xftdrawable; } +#endif ///////////////////////////////////////////////////////////////////////////// @@ -302,12 +307,13 @@ { text_t t = *text++; + // is it in our linedrawing table? if (t >= 0x2500 & t <= 0x2580 && linedraw_cmds[t - 0x2500]) { const char *p = linedraw_cmds[t - 0x2500]; - int x0 = x, x1 = x + r->TermWin.fwidth / 2, x2 = x + r->TermWin.fwidth ; - int y0 = y, y1 = y + r->TermWin.fheight / 2, y2 = y + r->TermWin.fheight; + int x0 = x, x1 = x + r->TermWin.fwidth / 2, x2 = x + r->TermWin.fwidth - 1; + int y0 = y, y1 = y + r->TermWin.fheight / 2, y2 = y + r->TermWin.fheight - 1; XGCValues gcv; @@ -338,13 +344,22 @@ XChangeGC (d.display->display, GC, GCLineWidth, &gcv); } else - switch (*text++) + switch (t) { - case NOCHAR: case ZERO_WIDTH_CHAR: break; default: - XDrawRectangle (d.display->display, d, GC, x + 2, y + 2, r->TermWin.fwidth - 5, r->TermWin.fheight - 5); + int w = 0; + while (len > 0 && *text == NOCHAR) + { + ++text; + --len; + w += r->TermWin.fwidth; + } + + XDrawRectangle (d.display->display, d, GC, x + 2, y + 2, + w + r->TermWin.fwidth - 5, r->TermWin.fheight - 5); + x += w; } x += r->TermWin.fwidth; @@ -429,7 +444,7 @@ rxvt_font_x11::set_properties (rxvt_fontprop &p, const char *name) { int slashes = 0; - const char *comp[12]; + const char *comp[13]; for (const char *c = name; *c; c++) if (*c == '-')