… | |
… | |
262 | } |
262 | } |
263 | } |
263 | } |
264 | |
264 | |
265 | ///////////////////////////////////////////////////////////////////////////// |
265 | ///////////////////////////////////////////////////////////////////////////// |
266 | |
266 | |
267 | struct rxvt_font_default : rxvt_font { |
267 | struct rxvt_font_default : rxvt_font |
|
|
268 | { |
268 | struct rxvt_fontset *fs; |
269 | struct rxvt_fontset *fs; |
269 | |
270 | |
270 | rxvt_font_default (rxvt_fontset *fs) |
271 | rxvt_font_default (rxvt_fontset *fs) |
271 | : rxvt_font () |
272 | : rxvt_font () |
272 | { |
273 | { |
… | |
… | |
474 | case '\t': |
475 | case '\t': |
475 | case ZERO_WIDTH_CHAR: |
476 | case ZERO_WIDTH_CHAR: |
476 | case NOCHAR: |
477 | case NOCHAR: |
477 | break; |
478 | break; |
478 | |
479 | |
|
|
480 | /* |
|
|
481 | * If the base font does not support variation selectors, treat them as ZWC. |
|
|
482 | * a point could be made to do this for all wcwidth == 0 characters, but I |
|
|
483 | * decided against that until more data is available. |
|
|
484 | */ |
|
|
485 | case 0xfe00: case 0xfe01: case 0xfe02: case 0xfe03: case 0xfe04: case 0xfe05: case 0xfe06: case 0xfe07: |
|
|
486 | case 0xfe08: case 0xfe09: case 0xfe0a: case 0xfe0b: case 0xfe0c: case 0xfe0d: case 0xfe0e: case 0xfe0f: |
|
|
487 | break; |
|
|
488 | |
479 | default: |
489 | default: |
480 | XDrawRectangle (disp, d, gc, x + 2, y + 2, |
490 | XDrawRectangle (disp, d, gc, x + 2, y + 2, |
481 | fwidth - 4, term->fheight - 4); |
491 | fwidth - 4, term->fheight - 4); |
482 | } |
492 | } |
483 | |
493 | |
484 | x += fwidth; |
494 | x += fwidth; |
485 | } |
495 | } |
486 | } |
496 | } |
487 | |
497 | |
488 | struct rxvt_font_overflow : rxvt_font { |
498 | struct rxvt_font_overflow : rxvt_font |
|
|
499 | { |
489 | struct rxvt_fontset *fs; |
500 | struct rxvt_fontset *fs; |
490 | |
501 | |
491 | rxvt_font_overflow (rxvt_fontset *fs) |
502 | rxvt_font_overflow (rxvt_fontset *fs) |
492 | : rxvt_font () |
503 | : rxvt_font () |
493 | { |
504 | { |
… | |
… | |
539 | } |
550 | } |
540 | }; |
551 | }; |
541 | |
552 | |
542 | ///////////////////////////////////////////////////////////////////////////// |
553 | ///////////////////////////////////////////////////////////////////////////// |
543 | |
554 | |
544 | struct rxvt_font_x11 : rxvt_font { |
555 | struct rxvt_font_x11 : rxvt_font |
|
|
556 | { |
545 | rxvt_font_x11 () { f = 0; } |
557 | rxvt_font_x11 () { f = 0; } |
546 | |
558 | |
547 | void clear (); |
559 | void clear (); |
548 | |
560 | |
549 | rxvt_fontprop properties (); |
561 | rxvt_fontprop properties (); |
… | |
… | |
1124 | |
1136 | |
1125 | ///////////////////////////////////////////////////////////////////////////// |
1137 | ///////////////////////////////////////////////////////////////////////////// |
1126 | |
1138 | |
1127 | #if XFT |
1139 | #if XFT |
1128 | |
1140 | |
1129 | struct rxvt_font_xft : rxvt_font { |
1141 | struct rxvt_font_xft : rxvt_font |
|
|
1142 | { |
1130 | rxvt_font_xft () { f = 0; } |
1143 | rxvt_font_xft () |
|
|
1144 | { |
|
|
1145 | f = 0; |
|
|
1146 | } |
1131 | |
1147 | |
1132 | void clear (); |
1148 | void clear (); |
1133 | |
1149 | |
1134 | rxvt_fontprop properties (); |
1150 | rxvt_fontprop properties (); |
1135 | |
1151 | |
… | |
… | |
1734 | // way to configure this and xft is easier to hack in, |
1750 | // way to configure this and xft is easier to hack in, |
1735 | // while x11 has more framework in place already. |
1751 | // while x11 has more framework in place already. |
1736 | // TODO: this is a real resource hog, xft takes ages(?) |
1752 | // TODO: this is a real resource hog, xft takes ages(?) |
1737 | #if XFT && USE_SLOW_LOOKUP |
1753 | #if XFT && USE_SLOW_LOOKUP |
1738 | // grab the first xft font that seems suitable |
1754 | // grab the first xft font that seems suitable |
|
|
1755 | // TOOD: should go first for cellchar (spacing 110) then mono, then else |
1739 | FcPattern *p = FcPatternCreate (); |
1756 | FcPattern *p = FcPatternCreate (); |
1740 | |
1757 | |
1741 | FcCharSet *s = FcCharSetCreate (); |
1758 | FcCharSet *s = FcCharSetCreate (); |
1742 | FcCharSetAddChar (s, unicode); |
1759 | FcCharSetAddChar (s, unicode); |
1743 | FcPatternAddCharSet (p, FC_CHARSET, s); |
1760 | FcPatternAddCharSet (p, FC_CHARSET, s); |