… | |
… | |
275 | |
275 | |
276 | bool has_codepoint (uint32_t unicode) |
276 | bool has_codepoint (uint32_t unicode) |
277 | { |
277 | { |
278 | if (unicode <= 0x001f) |
278 | if (unicode <= 0x001f) |
279 | return true; |
279 | return true; |
|
|
280 | |
280 | if (unicode >= 0x0080 && unicode <= 0x009f) |
281 | if (unicode >= 0x0080 && unicode <= 0x009f) |
281 | return true; |
282 | return true; |
282 | |
283 | |
283 | if (unicode >= 0x2500 && unicode <= 0x257f |
284 | if (unicode >= 0x2500 && unicode <= 0x257f |
284 | && linedraw_cmds[unicode - 0x2500]) |
285 | && linedraw_cmds[unicode - 0x2500]) |
|
|
286 | return true; |
|
|
287 | |
|
|
288 | if (IS_COMPOSE (unicode)) |
285 | return true; |
289 | return true; |
286 | |
290 | |
287 | switch (unicode) |
291 | switch (unicode) |
288 | { |
292 | { |
289 | case ZERO_WIDTH_CHAR: |
293 | case ZERO_WIDTH_CHAR: |
… | |
… | |
307 | |
311 | |
308 | XSetForeground (d.display->display, GC, r->PixColors[fg]); |
312 | XSetForeground (d.display->display, GC, r->PixColors[fg]); |
309 | |
313 | |
310 | while (len--) |
314 | while (len--) |
311 | { |
315 | { |
|
|
316 | compose_char *cc; |
312 | text_t t = *text++; |
317 | text_t t = *text++; |
313 | |
318 | |
314 | // is it in our linedrawing table? |
319 | // is it in our linedrawing table? |
315 | if (t >= 0x2500 & t <= 0x2580 && linedraw_cmds[t - 0x2500]) |
320 | if (t >= 0x2500 & t <= 0x2580 && linedraw_cmds[t - 0x2500]) |
316 | { |
321 | { |
… | |
… | |
344 | } |
349 | } |
345 | } |
350 | } |
346 | |
351 | |
347 | gcv.line_width = 0; |
352 | gcv.line_width = 0; |
348 | XChangeGC (d.display->display, GC, GCLineWidth, &gcv); |
353 | XChangeGC (d.display->display, GC, GCLineWidth, &gcv); |
|
|
354 | } |
|
|
355 | else if (IS_COMPOSE (t) && (cc = rxvt_composite[t])) |
|
|
356 | { |
|
|
357 | (*fs)[fs->find_font (cc->c1)]->draw (d, x, y, &(t = cc->c1), 1, fg, bg); |
|
|
358 | if (cc->c2 != NOCHAR) |
|
|
359 | (*fs)[fs->find_font (cc->c2)]->draw (d, x, y, &(t = cc->c2), 1, fg, -1); |
349 | } |
360 | } |
350 | else |
361 | else |
351 | switch (t) |
362 | switch (t) |
352 | { |
363 | { |
353 | case ZERO_WIDTH_CHAR: |
364 | case ZERO_WIDTH_CHAR: |
… | |
… | |
1017 | f = new rxvt_font_x11; |
1028 | f = new rxvt_font_x11; |
1018 | } |
1029 | } |
1019 | else |
1030 | else |
1020 | f = new rxvt_font_x11; |
1031 | f = new rxvt_font_x11; |
1021 | |
1032 | |
|
|
1033 | f->fs = this; |
1022 | f->set_term (r); |
1034 | f->set_term (r); |
1023 | f->set_name (strdup (name)); |
1035 | f->set_name (strdup (name)); |
1024 | |
1036 | |
1025 | f->cs = cs; |
1037 | f->cs = cs; |
1026 | f->loaded = false; |
1038 | f->loaded = false; |