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