ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/rxvtfont.C
(Generate patch)

Comparing rxvt-unicode/src/rxvtfont.C (file contents):
Revision 1.195 by root, Mon Sep 7 14:50:56 2015 UTC vs.
Revision 1.199 by root, Thu Jun 17 00:08:35 2021 UTC

239 else if (color >= 0) 239 else if (color >= 0)
240 { 240 {
241#if XFT 241#if XFT
242 Picture dst; 242 Picture dst;
243 243
244# ifdef HAVE_BG_PIXMAP 244# ifdef HAVE_IMG
245 if (term->bg_img 245 if (term->bg_img
246 && !term->pix_colors[color].is_opaque () 246 && !term->pix_colors[color].is_opaque ()
247 && ((dst = XftDrawPicture (d)))) 247 && ((dst = XftDrawPicture (d))))
248 { 248 {
249 XClearArea (disp, d, x, y, w, h, false); 249 XClearArea (disp, d, x, y, w, h, false);
262 } 262 }
263} 263}
264 264
265///////////////////////////////////////////////////////////////////////////// 265/////////////////////////////////////////////////////////////////////////////
266 266
267struct rxvt_font_default : rxvt_font { 267struct 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
488struct rxvt_font_overflow : rxvt_font { 498struct 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
544struct rxvt_font_x11 : rxvt_font { 555struct 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
1129struct rxvt_font_xft : rxvt_font { 1141struct 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
1410 { 1426 {
1411 if (ep != enc) 1427 if (ep != enc)
1412 { 1428 {
1413 rxvt_drawable &d2 = d.screen->scratch_drawable (w, h); 1429 rxvt_drawable &d2 = d.screen->scratch_drawable (w, h);
1414 1430
1415#ifdef HAVE_BG_PIXMAP 1431#ifdef HAVE_IMG
1416 Picture dst = 0; // the only assignment is done conditionally in the following if condition 1432 Picture dst = 0; // the only assignment is done conditionally in the following if condition
1417 1433
1418 if (term->bg_img 1434 if (term->bg_img
1419 && (bg == Color_transparent || bg == Color_bg 1435 && (bg == Color_transparent || bg == Color_bg
1420 || (bg >= 0 && !term->pix_colors[bg].is_opaque () && ((dst = XftDrawPicture (d2)))))) 1436 || (bg >= 0 && !term->pix_colors[bg].is_opaque () && ((dst = XftDrawPicture (d2))))))
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);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines