ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/defaultfont.C
(Generate patch)

Comparing rxvt-unicode/src/defaultfont.C (file contents):
Revision 1.26 by pcg, Fri Feb 27 02:52:51 2004 UTC vs.
Revision 1.27 by pcg, Wed Mar 3 00:20:33 2004 UTC

72 { CS_BIG5_EXT, "xft:AR PL Mingti2L Big5" }, 72 { CS_BIG5_EXT, "xft:AR PL Mingti2L Big5" },
73 { CS_BIG5_EXT, "xft:AR PL KaitiM Big5" }, 73 { CS_BIG5_EXT, "xft:AR PL KaitiM Big5" },
74 { CS_GB2312_1980_0, "xft:AR PL KaitiM GB" }, 74 { CS_GB2312_1980_0, "xft:AR PL KaitiM GB" },
75 { CS_GB2312_1980_0, "xft:AR PL SungtiL GB" }, 75 { CS_GB2312_1980_0, "xft:AR PL SungtiL GB" },
76# endif 76# endif
77 { CS_BIG5_EXT, "-*-*-*-*-*-*-*-*-*-*-c-*-big5*-0" },
77 { CS_CNS11643_1992_1, "-*-*-*-*-*-*-*-*-*-*-c-*-gb2312*-0" }, 78 { CS_CNS11643_1992_1, "-*-*-*-*-*-*-*-*-*-*-c-*-gb2312*-0" },
78 { CS_CNS11643_1992_1, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-1" }, 79 { CS_CNS11643_1992_1, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-1" },
79 { CS_CNS11643_1992_2, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-2" }, 80 { CS_CNS11643_1992_2, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-2" },
80 { CS_CNS11643_1992_3, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-3" }, 81 { CS_CNS11643_1992_3, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-3" },
81 { CS_CNS11643_1992_4, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-4" }, 82 { CS_CNS11643_1992_4, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-4" },
82 { CS_CNS11643_1992_5, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-5" }, 83 { CS_CNS11643_1992_5, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-5" },
83 { CS_CNS11643_1992_6, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-6" }, 84 { CS_CNS11643_1992_6, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-6" },
84 { CS_CNS11643_1992_7, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-7" }, 85 { CS_CNS11643_1992_7, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-7" },
85 { CS_CNS11643_1992_F, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-f" }, 86 { CS_CNS11643_1992_F, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-f" },
86#endif 87#endif
87 88
88#if XFT 89#if XFT
89 { CS_UNICODE, "xft:Andale Mono" }, 90 { CS_UNICODE, "xft:Andale Mono" },
90 { CS_UNICODE, "xft:Arial Unicode MS" }, 91 { CS_UNICODE, "xft:Arial Unicode MS" },
302 303
303 while (len--) 304 while (len--)
304 { 305 {
305 text_t t = *text++; 306 text_t t = *text++;
306 307
308 // is it in our linedrawing table?
307 if (t >= 0x2500 & t <= 0x2580 && linedraw_cmds[t - 0x2500]) 309 if (t >= 0x2500 & t <= 0x2580 && linedraw_cmds[t - 0x2500])
308 { 310 {
309 const char *p = linedraw_cmds[t - 0x2500]; 311 const char *p = linedraw_cmds[t - 0x2500];
310 312
311 int x0 = x, x1 = x + r->TermWin.fwidth / 2, x2 = x + r->TermWin.fwidth - 1; 313 int x0 = x, x1 = x + r->TermWin.fwidth / 2, x2 = x + r->TermWin.fwidth - 1;
338 340
339 gcv.line_width = 0; 341 gcv.line_width = 0;
340 XChangeGC (d.display->display, GC, GCLineWidth, &gcv); 342 XChangeGC (d.display->display, GC, GCLineWidth, &gcv);
341 } 343 }
342 else 344 else
343 switch (*text++) 345 switch (t)
344 { 346 {
345 case NOCHAR:
346 case ZERO_WIDTH_CHAR: 347 case ZERO_WIDTH_CHAR:
347 break; 348 break;
348 default: 349 default:
349 XDrawRectangle (d.display->display, d, GC, x + 2, y + 2, r->TermWin.fwidth - 5, r->TermWin.fheight - 5); 350 int w = 0;
351 while (len > 0 && *text == NOCHAR)
352 {
353 ++text;
354 --len;
355 w += r->TermWin.fwidth;
356 }
357
358 XDrawRectangle (d.display->display, d, GC, x + 2, y + 2,
359 w + r->TermWin.fwidth - 5, r->TermWin.fheight - 5);
360 x += w;
350 } 361 }
351 362
352 x += r->TermWin.fwidth; 363 x += r->TermWin.fwidth;
353 } 364 }
354} 365}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines