--- rxvt-unicode/src/rxvtfont.C 2011/02/07 17:22:41 1.177 +++ rxvt-unicode/src/rxvtfont.C 2011/05/30 18:39:03 1.180 @@ -1,7 +1,7 @@ /*----------------------------------------------------------------------* * File: rxvtfont.C *----------------------------------------------------------------------* - * Copyright (c) 2003-2008 Marc Lehmann + * Copyright (c) 2003-2008 Marc Lehmann * - original version. * * This program is free software; you can redistribute it and/or modify @@ -526,12 +526,16 @@ const text_t *text, int len, int fg, int bg) { - while (len--) + while (len) { int fid = fs->find_font_idx (*text); - (*fs)[fid]->draw (d, x, y, text, 1, fg, bg); - ++text; - x += term->fwidth; + int w = 1; + while (w < len && text[w] == NOCHAR) + w++; + (*fs)[fid]->draw (d, x, y, text, w, fg, bg); + text += w; + len -= w; + x += term->fwidth * w; } } }; @@ -923,7 +927,7 @@ width = 1; - for (uint16_t *t = extent_test_chars + ARRAY_LENGTH(extent_test_chars); t-- > extent_test_chars; ) + for (uint16_t *t = extent_test_chars + ecb_array_length (extent_test_chars); t-- > extent_test_chars; ) { if (FROM_UNICODE (cs, *t) == NOCHAR) continue; @@ -1245,7 +1249,7 @@ int glheight = height; - for (uint16_t *t = extent_test_chars + ARRAY_LENGTH(extent_test_chars); t-- > extent_test_chars; ) + for (uint16_t *t = extent_test_chars + ecb_array_length (extent_test_chars); t-- > extent_test_chars; ) { FcChar16 ch = *t;