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.177 by sf-exg, Mon Feb 7 17:22:41 2011 UTC vs.
Revision 1.180 by sf-exg, Mon May 30 18:39:03 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/////////////////////////////////////////////////////////////////////////////
921 } 925 }
922#endif 926#endif
923 927
924 width = 1; 928 width = 1;
925 929
926 for (uint16_t *t = extent_test_chars + ARRAY_LENGTH(extent_test_chars); t-- > extent_test_chars; ) 930 for (uint16_t *t = extent_test_chars + ecb_array_length (extent_test_chars); t-- > extent_test_chars; )
927 { 931 {
928 if (FROM_UNICODE (cs, *t) == NOCHAR) 932 if (FROM_UNICODE (cs, *t) == NOCHAR)
929 continue; 933 continue;
930 934
931 // ignore characters we wouldn't use anyways 935 // ignore characters we wouldn't use anyways
1243 1247
1244 XftUnlockFace (f); 1248 XftUnlockFace (f);
1245 1249
1246 int glheight = height; 1250 int glheight = height;
1247 1251
1248 for (uint16_t *t = extent_test_chars + ARRAY_LENGTH(extent_test_chars); t-- > extent_test_chars; ) 1252 for (uint16_t *t = extent_test_chars + ecb_array_length (extent_test_chars); t-- > extent_test_chars; )
1249 { 1253 {
1250 FcChar16 ch = *t; 1254 FcChar16 ch = *t;
1251 1255
1252 if (cs != CS_UNICODE 1256 if (cs != CS_UNICODE
1253 && ch > 0x100 1257 && ch > 0x100

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines