rxvt-unicode treats XFT character sizes slightly different from most other terminals. Perhaps its treatment is more correct, but it causes increase of character spacing by about 10% for most (if not all) fonts. Read the following message for details: http://lists.schmorp.de/pipermail/rxvt-unicode/2007q4/000514.html The author of rxvt refuses to include this patch into his code - he claims that his treatment of character width is the only correct. But it causes increase of intercharacter space above ACTUAL font character spacing, so text rendered in rxvt looks worse than the same text with the same font but in another terminal due to excess space between characters. So I propose including of the patch mentioned above into portage tree as an optional patch for rxvt-unicode, which could be enabled by USE-flag. Reproducible: Always
Please attach a patch or a link to a patch.
(In reply to comment #1) > Please attach a patch or a link to a patch. > The url of message mentioned above has changed, the correct one is: http://lists.schmorp.de/pipermail/rxvt-unicode/2007q4/000511.html Here is the patch from this e-mail message: --- 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; }
Created attachment 208727 [details, diff] Patch for rxvt-unicode-9.06 Here is the patch slightly cleaned up (and which applies cleanly on latest rxvt-unicode)
Information provided, reopening
I added this patch in rxvt-unicode-9.07-r1. You need USE=-vanilla to apply it.