From 0b82835a6d00b7aa1243c765d0e56d50dc7e1a18 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 9 Jan 2006 07:31:26 +0000 Subject: [PATCH] *** empty log message *** --- Changes | 4 ++-- src/rxvtfont.C | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Changes b/Changes index 2ea48c39..b71129d7 100644 --- a/Changes +++ b/Changes @@ -11,8 +11,8 @@ WISH: support tex fonts - added sections for DISTRIBUTION MAINTAINERS and about SETUID/SETGID to the FAQ. - - increased xft drawing speed for problematic fonts, speed - seems to be entirely server-dependent now. + - increased xft drawing speed for problematic fonts. The effect + will likely be small as 99% of the xft slowness is server-related. - selection, selection-popup and option-popup extensions enabled by default. - perl: much increased functionality, better overlays, popup support diff --git a/src/rxvtfont.C b/src/rxvtfont.C index 77934082..c1a3584b 100644 --- a/src/rxvtfont.C +++ b/src/rxvtfont.C @@ -1271,12 +1271,12 @@ rxvt_font_xft::draw (rxvt_drawable &d, int x, int y, const text_t *text, int len, int fg, int bg) { - clear_rect (d, x, y, r->fwidth * len, r->fheight, bg); - XGlyphInfo extents; - XftGlyphSpec *enc = (XftGlyphSpec *) get_enc_buf (len * sizeof (XftGlyphSpec)); + XftGlyphSpec *enc = (XftGlyphSpec *)get_enc_buf (len * sizeof (XftGlyphSpec)); XftGlyphSpec *ep = enc; + clear_rect (d, x, y, r->fwidth * len, r->fheight, bg); + // cut trailing spaces while (len && text [len - 1] == ' ') len--; @@ -1291,10 +1291,10 @@ rxvt_font_xft::draw (rxvt_drawable &d, int x, int y, if (fc != ' ') // skip spaces { - FT_UInt gl = XftCharIndex (d.display->display, f, fc); - XftGlyphExtents (d.display->display, f, &gl, 1, &extents); + FT_UInt glyph = XftCharIndex (d.display->display, f, fc); + XftGlyphExtents (d.display->display, f, &glyph, 1, &extents); - ep->glyph = gl; + ep->glyph = glyph; ep->x = x + (cwidth - extents.xOff >> 1); ep->y = y + ascent; ep++; -- 2.34.1