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.27 by pcg, Wed Mar 3 00:20:33 2004 UTC vs.
Revision 1.35 by pcg, Thu Mar 4 20:09:01 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_BIG5, "-*-*-*-*-*-*-*-*-*-*-c-*-big5-0" },
78 { CS_BIG5_PLUS, "-*-*-*-*-*-*-*-*-*-*-c-*-big5p-0" },
79 { CS_BIG5_EXT, "-*-*-*-*-*-*-*-*-*-*-c-*-big5.eten-0" },
78 { CS_CNS11643_1992_1, "-*-*-*-*-*-*-*-*-*-*-c-*-gb2312*-0" }, 80 { CS_CNS11643_1992_1, "-*-*-*-*-*-*-*-*-*-*-c-*-gb2312*-0" },
79 { CS_CNS11643_1992_1, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-1" }, 81 { CS_CNS11643_1992_1, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-1" },
80 { CS_CNS11643_1992_2, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-2" }, 82 { CS_CNS11643_1992_2, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-2" },
81 { CS_CNS11643_1992_3, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-3" }, 83 { CS_CNS11643_1992_3, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-3" },
82 { CS_CNS11643_1992_4, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-4" }, 84 { CS_CNS11643_1992_4, "-*-*-*-*-*-*-*-*-*-*-c-*-cns11643*-4" },
94 { CS_UNICODE, "xft:FreeMono" }, 96 { CS_UNICODE, "xft:FreeMono" },
95 { CS_UNICODE, "-*-unifont-*-*-*-*-*-*-*-*-c-*-iso10646-1" }, 97 { CS_UNICODE, "-*-unifont-*-*-*-*-*-*-*-*-c-*-iso10646-1" },
96 { CS_UNICODE, "-*-*-*-r-*-*-*-*-*-*-c-*-iso10646-1" }, 98 { CS_UNICODE, "-*-*-*-r-*-*-*-*-*-*-c-*-iso10646-1" },
97 { CS_UNICODE, "-*-*-*-r-*-*-*-*-*-*-m-*-iso10646-1" }, 99 { CS_UNICODE, "-*-*-*-r-*-*-*-*-*-*-m-*-iso10646-1" },
98 100
101#if UNICODE_3 && XFT
102 { CS_UNICODE, "xft:Code2001" }, // contains many plane-1 characters
103#endif
104
99 { CS_UNKNOWN, 0 } 105 { CS_UNKNOWN, 0 }
100}; 106};
101 107
102///////////////////////////////////////////////////////////////////////////// 108/////////////////////////////////////////////////////////////////////////////
103 109
269 275
270 bool has_codepoint (uint32_t unicode) 276 bool has_codepoint (uint32_t unicode)
271 { 277 {
272 if (unicode <= 0x001f) 278 if (unicode <= 0x001f)
273 return true; 279 return true;
280
274 if (unicode >= 0x0080 && unicode <= 0x009f) 281 if (unicode >= 0x0080 && unicode <= 0x009f)
275 return true; 282 return true;
276 283
277 if (unicode >= 0x2500 && unicode <= 0x257f 284 if (unicode >= 0x2500 && unicode <= 0x257f
278 && linedraw_cmds[unicode - 0x2500]) 285 && linedraw_cmds[unicode - 0x2500])
286 return true;
287
288 if (IS_COMPOSE (unicode))
279 return true; 289 return true;
280 290
281 switch (unicode) 291 switch (unicode)
282 { 292 {
283 case ZERO_WIDTH_CHAR: 293 case ZERO_WIDTH_CHAR:
308 // is it in our linedrawing table? 318 // is it in our linedrawing table?
309 if (t >= 0x2500 & t <= 0x2580 && linedraw_cmds[t - 0x2500]) 319 if (t >= 0x2500 & t <= 0x2580 && linedraw_cmds[t - 0x2500])
310 { 320 {
311 const char *p = linedraw_cmds[t - 0x2500]; 321 const char *p = linedraw_cmds[t - 0x2500];
312 322
313 int x0 = x, x1 = x + r->TermWin.fwidth / 2, x2 = x + r->TermWin.fwidth - 1; 323 int x0 = x, x1 = x + (r->TermWin.fwidth - 1) / 2, x2 = x + r->TermWin.fwidth - 1;
314 int y0 = y, y1 = y + r->TermWin.fheight / 2, y2 = y + r->TermWin.fheight - 1; 324 int y0 = y, y1 = y + (r->TermWin.fheight - 1) / 2, y2 = y + r->TermWin.fheight - 1;
315 325
316 XGCValues gcv; 326 XGCValues gcv;
317 327
318 while (*p) 328 while (*p)
319 { 329 {
338 } 348 }
339 } 349 }
340 350
341 gcv.line_width = 0; 351 gcv.line_width = 0;
342 XChangeGC (d.display->display, GC, GCLineWidth, &gcv); 352 XChangeGC (d.display->display, GC, GCLineWidth, &gcv);
353 }
354 else if (IS_COMPOSE (t))
355 {
356 const compose_char &cc = rxvt_composite[t];
357 (void)0; //D ADD pseudo handling here
343 } 358 }
344 else 359 else
345 switch (t) 360 switch (t)
346 { 361 {
347 case ZERO_WIDTH_CHAR: 362 case ZERO_WIDTH_CHAR:
440 455
441bool 456bool
442rxvt_font_x11::set_properties (rxvt_fontprop &p, const char *name) 457rxvt_font_x11::set_properties (rxvt_fontprop &p, const char *name)
443{ 458{
444 int slashes = 0; 459 int slashes = 0;
445 const char *comp[12]; 460 const char *comp[13];
446 461
447 for (const char *c = name; *c; c++) 462 for (const char *c = name; *c; c++)
448 if (*c == '-') 463 if (*c == '-')
449 { 464 {
450 comp[slashes++] = c + 1; 465 comp[slashes++] = c + 1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines