Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Terminals (urxvt/st) with blurry, distorted font
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Exumcalin
n00b
n00b


Joined: 17 Mar 2009
Posts: 7

PostPosted: Sun Mar 19, 2017 9:51 am    Post subject: [SOLVED] Terminals (urxvt/st) with blurry, distorted font Reply with quote

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? :cry:


:!: 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
View user's profile Send private message
Exumcalin
n00b
n00b


Joined: 17 Mar 2009
Posts: 7

PostPosted: Sun Mar 19, 2017 2:34 pm    Post subject: Solution Reply with quote

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... :evil:


Last edited by Exumcalin on Sun Mar 19, 2017 3:22 pm; edited 3 times in total
Back to top
View user's profile Send private message
cboldt
l33t
l33t


Joined: 24 Aug 2005
Posts: 829

PostPosted: Sun Mar 19, 2017 2:53 pm    Post subject: Reply with quote

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
View user's profile Send private message
Exumcalin
n00b
n00b


Joined: 17 Mar 2009
Posts: 7

PostPosted: Sun Mar 19, 2017 3:21 pm    Post subject: Reply with quote

You're right cboldt - thanks for the hint. I added it to my solution. :wink:
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5592

PostPosted: Sun Mar 19, 2017 5:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
Exumcalin
n00b
n00b


Joined: 17 Mar 2009
Posts: 7

PostPosted: Sun Mar 19, 2017 6:42 pm    Post subject: Reply with quote

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. :wink:
Back to top
View user's profile Send private message
danboston
n00b
n00b


Joined: 17 Nov 2016
Posts: 47

PostPosted: Tue Mar 21, 2017 1:52 am    Post subject: Reply with quote

I had the same problem. Thanks for posting the solution. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum