summarylogtreecommitdiffstats
path: root/font-width-fix.patch
diff options
context:
space:
mode:
authorDaniel Hahler2016-12-23 08:32:41 +0100
committerDaniel Hahler2016-12-23 08:35:00 +0100
commita14b2b6466ff3ea99da33a5b8eb9f950a714d2e0 (patch)
treeacf37f939eb282478908d25e7bc6fbe29802ed42 /font-width-fix.patch
parente266d94847ec068170956cb6571e68f1b3a4dc2e (diff)
downloadaur-a14b2b6466ff3ea99da33a5b8eb9f950a714d2e0.tar.gz
Revert "Remove font-width-fix.patch"
Sadly, "the fontwidth patch is *the* main reason why people are using this package" apparently. This reverts commit f32975b117205707fc43298fcb0b96b4050b94c9.
Diffstat (limited to 'font-width-fix.patch')
-rw-r--r--font-width-fix.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/font-width-fix.patch b/font-width-fix.patch
new file mode 100644
index 00000000000..811d9e615ab
--- /dev/null
+++ b/font-width-fix.patch
@@ -0,0 +1,26 @@
+--- src/rxvtfont.C.bukind 2007-11-30 14:36:33.000000000 +0600
++++ src/rxvtfont.C 2007-11-30 14:39:29.000000000 +0600
+@@ -1171,12 +1171,21 @@
+ XGlyphInfo g;
+ XftTextExtents16 (disp, f, &ch, 1, &g);
+
++/*
++ * bukind: don't use g.width as a width of a character!
++ * instead use g.xOff, see e.g.: http://keithp.com/~keithp/render/Xft.tutorial
++
+ g.width -= g.x;
+
+ int wcw = WCWIDTH (ch);
+ if (wcw > 0) g.width = (g.width + wcw - 1) / wcw;
+
+ if (width < g.width ) width = g.width;
++ */
++ int wcw = WCWIDTH (ch);
++ if (wcw > 1) g.xOff = g.xOff / wcw;
++ if (width < g.xOff) width = g.xOff;
++
+ if (height < g.height ) height = g.height;
+ if (glheight < g.height - g.y) glheight = g.height - g.y;
+ }
+
+