Gentoo Archives: gentoo-commits

From: "Jeroen Roovers (jer)" <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in x11-terms/rxvt-unicode/files: rxvt-unicode-9.06-font-width.patch
Date: Wed, 03 Feb 2010 05:07:52
Message-Id: E1NcXSs-0005ge-Vt@stork.gentoo.org
1 jer 10/02/03 05:07:46
2
3 Added: rxvt-unicode-9.06-font-width.patch
4 Log:
5 Add character width patch thanks to Slava Gorbunov (bug #277830). Do not evaluate USE flags in subshell. Die when emake fails.
6 (Portage version: 2.2_rc62/cvs/Linux i686)
7
8 Revision Changes Path
9 1.1 x11-terms/rxvt-unicode/files/rxvt-unicode-9.06-font-width.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-terms/rxvt-unicode/files/rxvt-unicode-9.06-font-width.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-terms/rxvt-unicode/files/rxvt-unicode-9.06-font-width.patch?rev=1.1&content-type=text/plain
13
14 Index: rxvt-unicode-9.06-font-width.patch
15 ===================================================================
16 --- src/rxvtfont.C.orig 2008-07-09 12:21:45.000000000 +0400
17 +++ src/rxvtfont.C 2009-10-30 14:32:53.000000000 +0300
18 @@ -1195,12 +1195,14 @@
19 XGlyphInfo g;
20 XftTextExtents16 (disp, f, &ch, 1, &g);
21
22 - g.width -= g.x;
23 -
24 +/*
25 + * bukind: don't use g.width as a width of a character!
26 + * instead use g.xOff, see e.g.: http://keithp.com/~keithp/render/Xft.tutorial
27 + */
28 int wcw = WCWIDTH (ch);
29 - if (wcw > 0) g.width = (g.width + wcw - 1) / wcw;
30 + if (wcw > 1) g.xOff = g.xOff / wcw;
31 + if (width < g.xOff) width = g.xOff;
32
33 - if (width < g.width ) width = g.width;
34 if (height < g.height ) height = g.height;
35 if (glheight < g.height - g.y) glheight = g.height - g.y;
36 }