… | |
… | |
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" }, |
… | |
… | |
93 | { CS_UNICODE, "xft:FreeMono" }, |
96 | { CS_UNICODE, "xft:FreeMono" }, |
94 | { CS_UNICODE, "-*-unifont-*-*-*-*-*-*-*-*-c-*-iso10646-1" }, |
97 | { CS_UNICODE, "-*-unifont-*-*-*-*-*-*-*-*-c-*-iso10646-1" }, |
95 | { CS_UNICODE, "-*-*-*-r-*-*-*-*-*-*-c-*-iso10646-1" }, |
98 | { CS_UNICODE, "-*-*-*-r-*-*-*-*-*-*-c-*-iso10646-1" }, |
96 | { CS_UNICODE, "-*-*-*-r-*-*-*-*-*-*-m-*-iso10646-1" }, |
99 | { CS_UNICODE, "-*-*-*-r-*-*-*-*-*-*-m-*-iso10646-1" }, |
97 | |
100 | |
|
|
101 | #if UNICODE_3 && XFT |
|
|
102 | { CS_UNICODE, "xft:Code2001" }, // contains many plane-1 characters |
|
|
103 | #endif |
|
|
104 | |
98 | { CS_UNKNOWN, 0 } |
105 | { CS_UNKNOWN, 0 } |
99 | }; |
106 | }; |
100 | |
107 | |
101 | ///////////////////////////////////////////////////////////////////////////// |
108 | ///////////////////////////////////////////////////////////////////////////// |
102 | |
109 | |
… | |
… | |
302 | |
309 | |
303 | while (len--) |
310 | while (len--) |
304 | { |
311 | { |
305 | text_t t = *text++; |
312 | text_t t = *text++; |
306 | |
313 | |
|
|
314 | // is it in our linedrawing table? |
307 | if (t >= 0x2500 & t <= 0x2580 && linedraw_cmds[t - 0x2500]) |
315 | if (t >= 0x2500 & t <= 0x2580 && linedraw_cmds[t - 0x2500]) |
308 | { |
316 | { |
309 | const char *p = linedraw_cmds[t - 0x2500]; |
317 | const char *p = linedraw_cmds[t - 0x2500]; |
310 | |
318 | |
311 | int x0 = x, x1 = x + r->TermWin.fwidth / 2, x2 = x + r->TermWin.fwidth - 1; |
319 | int x0 = x, x1 = x + (r->TermWin.fwidth - 1) / 2, x2 = x + r->TermWin.fwidth - 1; |
312 | int y0 = y, y1 = y + r->TermWin.fheight / 2, y2 = y + r->TermWin.fheight - 1; |
320 | int y0 = y, y1 = y + (r->TermWin.fheight - 1) / 2, y2 = y + r->TermWin.fheight - 1; |
313 | |
321 | |
314 | XGCValues gcv; |
322 | XGCValues gcv; |
315 | |
323 | |
316 | while (*p) |
324 | while (*p) |
317 | { |
325 | { |
… | |
… | |
338 | |
346 | |
339 | gcv.line_width = 0; |
347 | gcv.line_width = 0; |
340 | XChangeGC (d.display->display, GC, GCLineWidth, &gcv); |
348 | XChangeGC (d.display->display, GC, GCLineWidth, &gcv); |
341 | } |
349 | } |
342 | else |
350 | else |
343 | switch (*text++) |
351 | switch (t) |
344 | { |
352 | { |
345 | case NOCHAR: |
|
|
346 | case ZERO_WIDTH_CHAR: |
353 | case ZERO_WIDTH_CHAR: |
347 | break; |
354 | break; |
348 | default: |
355 | default: |
349 | XDrawRectangle (d.display->display, d, GC, x + 2, y + 2, r->TermWin.fwidth - 5, r->TermWin.fheight - 5); |
356 | int w = 0; |
|
|
357 | while (len > 0 && *text == NOCHAR) |
|
|
358 | { |
|
|
359 | ++text; |
|
|
360 | --len; |
|
|
361 | w += r->TermWin.fwidth; |
|
|
362 | } |
|
|
363 | |
|
|
364 | XDrawRectangle (d.display->display, d, GC, x + 2, y + 2, |
|
|
365 | w + r->TermWin.fwidth - 5, r->TermWin.fheight - 5); |
|
|
366 | x += w; |
350 | } |
367 | } |
351 | |
368 | |
352 | x += r->TermWin.fwidth; |
369 | x += r->TermWin.fwidth; |
353 | } |
370 | } |
354 | } |
371 | } |
… | |
… | |
429 | |
446 | |
430 | bool |
447 | bool |
431 | rxvt_font_x11::set_properties (rxvt_fontprop &p, const char *name) |
448 | rxvt_font_x11::set_properties (rxvt_fontprop &p, const char *name) |
432 | { |
449 | { |
433 | int slashes = 0; |
450 | int slashes = 0; |
434 | const char *comp[12]; |
451 | const char *comp[13]; |
435 | |
452 | |
436 | for (const char *c = name; *c; c++) |
453 | for (const char *c = name; *c; c++) |
437 | if (*c == '-') |
454 | if (*c == '-') |
438 | { |
455 | { |
439 | comp[slashes++] = c + 1; |
456 | comp[slashes++] = c + 1; |