View previous topic :: View next topic |
Author |
Message |
Exumcalin n00b
Joined: 17 Mar 2009 Posts: 7
|
Posted: Sun Mar 19, 2017 9:51 am Post subject: [SOLVED] Terminals (urxvt/st) with blurry, distorted font |
|
|
Hey everyone,
I'm running i3 as window manager using urxvt extensively. After some updates and a reboot yesterday, the font rendering is distorted. I didn't changed my configs at all, and I know the tricks gambling around with letterspace, aliasing and hinting in .Xdefaults but it doesn't affect/correct the rendering issue in the right way.
Now, I think the problem relies on freetype... (see 3rd edit)
Problem description:
My DejaVu Sans Mono font doesn't look pixelated/crisp as I'm used to. Especially the 'm' letter is so blurry that it's hard to read. Symptoms are on URXVT and ST, but not on Xterm.
Could anyone give me a hint or assist me?
Edits
1) I checked my emerge logfile... media-libs/freetype had been updated due to a new xorg-server/-driver version.
2) Screenshots: https://abload.de/img/scrotfuk4r.png https://abload.de/img/scrot21jkcd.png
3) Similiar problems: https://github.com/google/fonts/issues/318, https://github.com/achaphiv/ppa-fonts/issues/29, http://www.bsdforen.de/threads/setenv-freetype_properties-oder-qu%C3%A4l-deine-augen.33365/
.
Last edited by Exumcalin on Sun Mar 19, 2017 9:09 pm; edited 3 times in total |
|
Back to top |
|
|
Exumcalin n00b
Joined: 17 Mar 2009 Posts: 7
|
Posted: Sun Mar 19, 2017 2:34 pm Post subject: Solution |
|
|
I managed it...
Background:
Freetype changed its rendering engine in vers. 2.7 to an updated renderer based on the approach of infinality. Before (v2.6 and older) a win95-style renderer had been in use.
For more details: https://www.freetype.org/freetype2/docs/subpixel-hinting.html
Solution:
Quote: |
Option 1 (system): create /etc/env.d/33freetype (or other name) and run env-update (thanks to cboldt)
Option 2 (session): create /etc/profile.d/freetype.sh if it doesn't already exist
Code: |
# Subpixel hinting mode can be chosen by setting the right TrueType interpreter
# version. The available settings are:
#
# truetype:interpreter-version=35 # Classic mode (default in 2.6)
# truetype:interpreter-version=38 # Infinality mode
# truetype:interpreter-version=40 # Minimal mode (default in 2.7)
#
# There are more properties that can be set, separated by whitespace. Please
# refer to the FreeType documentation for details.
# Uncomment and configure below
export FREETYPE_PROPERTIES="truetype:interpreter-version=35"
|
additional options: cff:no-stem-darkening=1 autofitter:wrapping=1
...most similiar as stated here: https://www.reddit.com/r/archlinux/comments/5n651l/macoslike_font_rendering_with_freetype2/
|
Result:
We need definitely some use-flags to handle this option for everybody. And we have to ensure that there's an understanding of the now depcreated infinality patch.
Last comment:
A very nasty thing to rule out...
Last edited by Exumcalin on Sun Mar 19, 2017 3:22 pm; edited 3 times in total |
|
Back to top |
|
|
cboldt Veteran
Joined: 24 Aug 2005 Posts: 1046
|
Posted: Sun Mar 19, 2017 2:53 pm Post subject: |
|
|
You are just passing an environment variable, and could put that assignment into a file in /etc/env.d, as well. After making that change, run `env-update`. |
|
Back to top |
|
|
Exumcalin n00b
Joined: 17 Mar 2009 Posts: 7
|
Posted: Sun Mar 19, 2017 3:21 pm Post subject: |
|
|
You're right cboldt - thanks for the hint. I added it to my solution. |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Sun Mar 19, 2017 5:56 pm Post subject: |
|
|
A bit late but urxvt does have a use flag for this - alt-font-width. I gave up on that because it seems to not work unless the planets align. |
|
Back to top |
|
|
Exumcalin n00b
Joined: 17 Mar 2009 Posts: 7
|
Posted: Sun Mar 19, 2017 6:42 pm Post subject: |
|
|
I don't think that the use-flag "alt-font-width" addresses the topic. The patch only makes use of XGlyphInfo/XftTextExtents, so it just readjusts the glyph width/height and not the rendering/aliasing. |
|
Back to top |
|
|
danboston n00b
Joined: 17 Nov 2016 Posts: 47
|
Posted: Tue Mar 21, 2017 1:52 am Post subject: |
|
|
I had the same problem. Thanks for posting the solution. |
|
Back to top |
|
|
|