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.171 by sf-exg, Thu Dec 30 17:28:29 2010 UTC vs.
Revision 1.176 by sf-exg, Fri Jan 28 00:08:58 2011 UTC

241 { 241 {
242#if XFT 242#if XFT
243 Picture dst; 243 Picture dst;
244 244
245# ifdef HAVE_BG_PIXMAP 245# ifdef HAVE_BG_PIXMAP
246 if (term->bgPixmap.pixmap 246 if (term->bg_pixmap
247 && !term->pix_colors[color].is_opaque () 247 && !term->pix_colors[color].is_opaque ()
248 && ((dst = XftDrawPicture (d)))) 248 && ((dst = XftDrawPicture (d))))
249 { 249 {
250 XClearArea (disp, d, x, y, w, h, false); 250 XClearArea (disp, d, x, y, w, h, false);
251 251
718 f = XLoadQueryFont (disp, name); 718 f = XLoadQueryFont (disp, name);
719 719
720 if (!f) 720 if (!f)
721 return false; 721 return false;
722 722
723 char *new_name = get_property (f, XA_FONT, name); 723 char *new_name = get_property (f, XA_FONT, 0);
724 724
725 if (new_name) 725 if (new_name)
726 set_name (new_name); 726 set_name (new_name);
727 else 727 else
728 rxvt_warn ("font '%s' has no FONT property, continuing without.", name); 728 rxvt_warn ("font '%s' has no FONT property, continuing without.\n", name);
729 729
730 XFreeFont (disp, f); 730 XFreeFont (disp, f);
731 f = 0; 731 f = 0;
732 } 732 }
733 733
1218 int ftheight = 0; 1218 int ftheight = 0;
1219 bool success = true; 1219 bool success = true;
1220 1220
1221 for (;;) 1221 for (;;)
1222 { 1222 {
1223 p = FcPatternDuplicate (match);
1223 f = XftFontOpenPattern (disp, FcPatternDuplicate (match)); 1224 f = XftFontOpenPattern (disp, p);
1224 1225
1225 if (!f) 1226 if (!f)
1226 { 1227 {
1228 FcPatternDestroy (p);
1227 success = false; 1229 success = false;
1228 break; 1230 break;
1229 } 1231 }
1230 1232
1231 FT_Face face = XftLockFace (f); 1233 FT_Face face = XftLockFace (f);
1404 rxvt_drawable &d2 = d.screen->scratch_drawable (w, h); 1406 rxvt_drawable &d2 = d.screen->scratch_drawable (w, h);
1405 1407
1406#ifdef HAVE_BG_PIXMAP 1408#ifdef HAVE_BG_PIXMAP
1407 Picture dst = 0; // the only assignment is done conditionally in the following if condition 1409 Picture dst = 0; // the only assignment is done conditionally in the following if condition
1408 1410
1409 if (term->bgPixmap.pixmap 1411 if (term->bg_pixmap
1410 && (bg == Color_transparent || bg == Color_bg 1412 && (bg == Color_transparent || bg == Color_bg
1411 || (bg >= 0 && !term->pix_colors[bg].is_opaque () && ((dst = XftDrawPicture (d2)))))) 1413 || (bg >= 0 && !term->pix_colors[bg].is_opaque () && ((dst = XftDrawPicture (d2))))))
1412 { 1414 {
1413 int src_x = x, src_y = y; 1415 int src_x = x, src_y = y;
1414 1416
1415 if (term->bgPixmap.flags & bgPixmap_t::isTransparent) 1417 if (term->bg_flags & rxvt_term::BG_IS_TRANSPARENT)
1416 { 1418 {
1417 src_x += term->window_vt_x; 1419 src_x += term->window_vt_x;
1418 src_y += term->window_vt_y; 1420 src_y += term->window_vt_y;
1419 } 1421 }
1420 1422
1421 if (term->bgPixmap.pmap_width >= src_x + w 1423 if (term->bg_pmap_width >= src_x + w
1422 && term->bgPixmap.pmap_height >= src_y + h) 1424 && term->bg_pmap_height >= src_y + h)
1423 { 1425 {
1424 XCopyArea (disp, term->bgPixmap.pixmap, d2, gc, 1426 XCopyArea (disp, term->bg_pixmap, d2, gc,
1425 src_x, src_y, w, h, 0, 0); 1427 src_x, src_y, w, h, 0, 0);
1426 } 1428 }
1427 else 1429 else
1428 { 1430 {
1429 XGCValues gcv; 1431 XGCValues gcv;
1430 1432
1431 gcv.fill_style = FillTiled; 1433 gcv.fill_style = FillTiled;
1432 gcv.tile = term->bgPixmap.pixmap; 1434 gcv.tile = term->bg_pixmap;
1433 gcv.ts_x_origin = -src_x; 1435 gcv.ts_x_origin = -src_x;
1434 gcv.ts_y_origin = -src_y; 1436 gcv.ts_y_origin = -src_y;
1435 1437
1436 XChangeGC (disp, gc, 1438 XChangeGC (disp, gc,
1437 GCTile | GCTileStipXOrigin | GCTileStipYOrigin | GCFillStyle, 1439 GCTile | GCTileStipXOrigin | GCTileStipYOrigin | GCFillStyle,
1612 buf[end - desc] = 0; 1614 buf[end - desc] = 0;
1613 1615
1614 push_font (new_font (buf, cs)); 1616 push_font (new_font (buf, cs));
1615 } 1617 }
1616 else 1618 else
1617 rxvt_warn ("fontset element too long (>511 bytes), ignored."); 1619 rxvt_warn ("fontset element too long (>511 bytes), ignored.\n");
1618 1620
1619 desc = end + 1; 1621 desc = end + 1;
1620 } 1622 }
1621 while (*end); 1623 while (*end);
1622 } 1624 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines