… | |
… | |
311 | |
311 | |
312 | XSetForeground (d.display->display, GC, r->PixColors[fg]); |
312 | XSetForeground (d.display->display, GC, r->PixColors[fg]); |
313 | |
313 | |
314 | while (len--) |
314 | while (len--) |
315 | { |
315 | { |
|
|
316 | compose_char *cc; |
316 | text_t t = *text++; |
317 | text_t t = *text++; |
317 | |
318 | |
318 | // is it in our linedrawing table? |
319 | // is it in our linedrawing table? |
319 | if (t >= 0x2500 & t <= 0x2580 && linedraw_cmds[t - 0x2500]) |
320 | if (t >= 0x2500 & t <= 0x2580 && linedraw_cmds[t - 0x2500]) |
320 | { |
321 | { |
… | |
… | |
349 | } |
350 | } |
350 | |
351 | |
351 | gcv.line_width = 0; |
352 | gcv.line_width = 0; |
352 | XChangeGC (d.display->display, GC, GCLineWidth, &gcv); |
353 | XChangeGC (d.display->display, GC, GCLineWidth, &gcv); |
353 | } |
354 | } |
354 | else if (IS_COMPOSE (t)) |
355 | else if (IS_COMPOSE (t) && (cc = rxvt_composite[t])) |
|
|
356 | { |
|
|
357 | rxvt_font *f1 = (*fs)[fs->find_font (cc->c1)]; |
|
|
358 | f1->draw (d, x, y, &(t = cc->c1), 1, fg, bg); |
|
|
359 | if (cc->c2 != NOCHAR) |
355 | { |
360 | { |
356 | const compose_char &cc = rxvt_composite[t]; |
361 | // prefer font of first character, for no good reasons |
357 | (void)0; //D ADD pseudo handling here |
362 | rxvt_font *f2 = f1->has_codepoint (cc->c2) |
|
|
363 | ? f1 |
|
|
364 | : (*fs)[fs->find_font (cc->c2)]; |
|
|
365 | |
|
|
366 | f2->draw (d, x, y, &(t = cc->c2), 1, fg, -1); |
|
|
367 | } |
358 | } |
368 | } |
359 | else |
369 | else |
360 | switch (t) |
370 | switch (t) |
361 | { |
371 | { |
362 | case ZERO_WIDTH_CHAR: |
372 | case ZERO_WIDTH_CHAR: |
… | |
… | |
1026 | f = new rxvt_font_x11; |
1036 | f = new rxvt_font_x11; |
1027 | } |
1037 | } |
1028 | else |
1038 | else |
1029 | f = new rxvt_font_x11; |
1039 | f = new rxvt_font_x11; |
1030 | |
1040 | |
|
|
1041 | f->fs = this; |
1031 | f->set_term (r); |
1042 | f->set_term (r); |
1032 | f->set_name (strdup (name)); |
1043 | f->set_name (strdup (name)); |
1033 | |
1044 | |
1034 | f->cs = cs; |
1045 | f->cs = cs; |
1035 | f->loaded = false; |
1046 | f->loaded = false; |