#996815 rxvt-unicode: Terminal text rendering too wide after upgrade to FreeType 2.11.0+dfsg-1 #996815
- Package:
- rxvt-unicode
- Source:
- rxvt-unicode
- Description:
- RXVT-like terminal emulator with Unicode and 256-color support
- Submitter:
- xcdc dxcx
- Date:
- 2023-08-20 09:09:02 UTC
- Severity:
- normal
Dear Maintainer, Upgrading libfreetype6 from 2.10.4+dfsg-1 to 2.11.0+dfsg-1 causes terminal text to be rendered wider than expected. Terminal application: rxvt-unicode 9.26-2 Font configuration (~/.Xdefaults line): URxvt*font: xft:Lucida Console:pixelsize=16:antialias=true:hinting=true Screenshot of text with 2.10.4+dfsg-1: https://i.imgur.com/GDvjsUu.png Screenshot of text with 2.11.0+dfsg-1: https://i.imgur.com/plUXnU6.png As can be seen on the screenshots, there is an extra pixel of whitespace between every text letter, which was not there before. A temporary workaround in the form of downgrading and pinning the libfreetype6 package fixed this.
Thank you for the bug report.
[snip]
I believe this is a long-standing bug in xft. Unfortunately, the
project is inactive, so it's difficult to say if and when this will be
fixed.
I'm attaching a patch adapted from Arch Linux to fix the issue in
rxvt-unicode. Please try it and see how you go.
For a quick workaround, add the following line to your ~/.Xdefaults file:
URxvt*letterSpace: -1
I have tested the patch and it fixes the problem. The .Xdefaults workaround with the unpatched rxvt-unicode also works. Thank you for a quick response and solution.
I discussed the patch with rxvt-unicode's author. It is a variant on a broken patch that has been circulating for a long time. It works with some poorly behaved fonts, but breaks the well-behaved ones. The patch is broken because xOff has nothing to do with the width of the character: xOff,yOff are the distance from the glyph origin to the next glyph origin.
I think it is time to close this. Fontconfig's update to 2.14.2 on August 16th (that is when it reached testing) made urxvt's font spacing return to normal, so the letterspace parameter in .Xdefaults is no longer needed. In fact, it makes the text harder to read because it is denser. Removing it made it look like it used to, so please verify it yourselves. Ugly screenshots and configs upon request.