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.175 by sf-exg, Thu Jan 27 17:37:19 2011 UTC vs.
Revision 1.179 by sf-exg, Tue May 3 08:48:26 2011 UTC

1/*----------------------------------------------------------------------* 1/*----------------------------------------------------------------------*
2 * File: rxvtfont.C 2 * File: rxvtfont.C
3 *----------------------------------------------------------------------* 3 *----------------------------------------------------------------------*
4 * Copyright (c) 2003-2008 Marc Lehmann <pcg@goof.com> 4 * Copyright (c) 2003-2008 Marc Lehmann <schmorp@schmorp.de>
5 * - original version. 5 * - original version.
6 * 6 *
7 * This program is free software; you can redistribute it and/or modify 7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or 9 * the Free Software Foundation; either version 2 of the License, or
524 524
525 void draw (rxvt_drawable &d, int x, int y, 525 void draw (rxvt_drawable &d, int x, int y,
526 const text_t *text, int len, 526 const text_t *text, int len,
527 int fg, int bg) 527 int fg, int bg)
528 { 528 {
529 while (len--) 529 while (len)
530 { 530 {
531 int fid = fs->find_font_idx (*text); 531 int fid = fs->find_font_idx (*text);
532 int w = 1;
533 while (w < len && text[w] == NOCHAR)
534 w++;
532 (*fs)[fid]->draw (d, x, y, text, 1, fg, bg); 535 (*fs)[fid]->draw (d, x, y, text, w, fg, bg);
533 ++text; 536 text += w;
537 len -= w;
534 x += term->fwidth; 538 x += term->fwidth * w;
535 } 539 }
536 } 540 }
537}; 541};
538 542
539///////////////////////////////////////////////////////////////////////////// 543/////////////////////////////////////////////////////////////////////////////
967} 971}
968 972
969bool 973bool
970rxvt_font_x11::has_char (unicode_t unicode, const rxvt_fontprop *prop, bool &careful) const 974rxvt_font_x11::has_char (unicode_t unicode, const rxvt_fontprop *prop, bool &careful) const
971{ 975{
976 careful = false;
977
972 uint32_t ch = FROM_UNICODE (cs, unicode); 978 uint32_t ch = FROM_UNICODE (cs, unicode);
973 979
974 if (ch == NOCHAR) 980 if (ch == NOCHAR)
975 return false; 981 return false;
976 982
1412 && (bg == Color_transparent || bg == Color_bg 1418 && (bg == Color_transparent || bg == Color_bg
1413 || (bg >= 0 && !term->pix_colors[bg].is_opaque () && ((dst = XftDrawPicture (d2)))))) 1419 || (bg >= 0 && !term->pix_colors[bg].is_opaque () && ((dst = XftDrawPicture (d2))))))
1414 { 1420 {
1415 int src_x = x, src_y = y; 1421 int src_x = x, src_y = y;
1416 1422
1417 if (term->bg_flags & rxvt_term::isTransparent) 1423 if (term->bg_flags & rxvt_term::BG_IS_TRANSPARENT)
1418 { 1424 {
1419 src_x += term->window_vt_x; 1425 src_x += term->window_vt_x;
1420 src_y += term->window_vt_y; 1426 src_y += term->window_vt_y;
1421 } 1427 }
1422 1428

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines