… | |
… | |
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" }, |
… | |
… | |
98 | { CS_UNKNOWN, 0 } |
101 | { CS_UNKNOWN, 0 } |
99 | }; |
102 | }; |
100 | |
103 | |
101 | ///////////////////////////////////////////////////////////////////////////// |
104 | ///////////////////////////////////////////////////////////////////////////// |
102 | |
105 | |
|
|
106 | #if XFT |
103 | rxvt_drawable::~rxvt_drawable () |
107 | rxvt_drawable::~rxvt_drawable () |
104 | { |
108 | { |
105 | if (xftdrawable) |
109 | if (xftdrawable) |
106 | XftDrawDestroy (xftdrawable); |
110 | XftDrawDestroy (xftdrawable); |
107 | } |
111 | } |
… | |
… | |
111 | if (!xftdrawable) |
115 | if (!xftdrawable) |
112 | xftdrawable = XftDrawCreate (display->display, drawable, display->visual, display->cmap); |
116 | xftdrawable = XftDrawCreate (display->display, drawable, display->visual, display->cmap); |
113 | |
117 | |
114 | return xftdrawable; |
118 | return xftdrawable; |
115 | } |
119 | } |
|
|
120 | #endif |
116 | |
121 | |
117 | ///////////////////////////////////////////////////////////////////////////// |
122 | ///////////////////////////////////////////////////////////////////////////// |
118 | |
123 | |
119 | static void *enc_buf; |
124 | static void *enc_buf; |
120 | static uint32_t enc_len; |
125 | static uint32_t enc_len; |
… | |
… | |
300 | |
305 | |
301 | while (len--) |
306 | while (len--) |
302 | { |
307 | { |
303 | text_t t = *text++; |
308 | text_t t = *text++; |
304 | |
309 | |
|
|
310 | // is it in our linedrawing table? |
305 | if (t >= 0x2500 & t <= 0x2580 && linedraw_cmds[t - 0x2500]) |
311 | if (t >= 0x2500 & t <= 0x2580 && linedraw_cmds[t - 0x2500]) |
306 | { |
312 | { |
307 | const char *p = linedraw_cmds[t - 0x2500]; |
313 | const char *p = linedraw_cmds[t - 0x2500]; |
308 | |
314 | |
309 | 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; |
… | |
… | |
336 | |
342 | |
337 | gcv.line_width = 0; |
343 | gcv.line_width = 0; |
338 | XChangeGC (d.display->display, GC, GCLineWidth, &gcv); |
344 | XChangeGC (d.display->display, GC, GCLineWidth, &gcv); |
339 | } |
345 | } |
340 | else |
346 | else |
341 | switch (*text++) |
347 | switch (t) |
342 | { |
348 | { |
343 | case NOCHAR: |
|
|
344 | case ZERO_WIDTH_CHAR: |
349 | case ZERO_WIDTH_CHAR: |
345 | break; |
350 | break; |
346 | default: |
351 | default: |
347 | 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; |
348 | } |
363 | } |
349 | |
364 | |
350 | x += r->TermWin.fwidth; |
365 | x += r->TermWin.fwidth; |
351 | } |
366 | } |
352 | } |
367 | } |