Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Blurry fonts with qtwebengine (works in Arch)
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
Hund
n00b
n00b


Joined: 18 Jul 2016
Posts: 40
Location: Sweden

PostPosted: Thu Jul 26, 2018 5:50 pm    Post subject: [Solved] Blurry fonts with qtwebengine (works in Arch) Reply with quote

With qutebrowser and qtwebengine in Gentoo I get blurry fonts, it works fine in Arch Linux and I can't figure out what's different there.

Here's a picture with qtwebengine vs qtwebkit: https://framapic.org/O3xM88nj5PIN/9zVcZcWjEP4a.png

I don't really know how to debug this?
_________________
Screenshots | dotfiles | Blog


Last edited by Hund on Fri Jul 27, 2018 5:40 pm; edited 2 times in total
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5593

PostPosted: Thu Jul 26, 2018 9:43 pm    Post subject: Reply with quote

If I zoom your screenshot out to 66%, it looks pretty sharp. Are you using any custom screen DPI/zoom settings somewhere?
Back to top
View user's profile Send private message
mike155
l33t
l33t


Joined: 17 Sep 2010
Posts: 997
Location: Frankfurt, Germany

PostPosted: Thu Jul 26, 2018 10:10 pm    Post subject: Reply with quote

Quote:
I don't really know how to debug this?

I assume that you configured your Gentoo machine as recommended in the Gentoo handbook. If you didn't do that: ignore my post and read the handbook.

Freetype is used to render fonts. Unfortunately, Freetype can be tweaked with a lot of parameters. If those parameters differ between your Arch Linux machine and your Gentoo machine, output on the screen will be different.

Fontconfig is used to define those parameters. Unfortunately, parameters defined by fontconfig can be overridden by your Desktop GUI and by the program you run (Firefox, Qutebrowser, etc.). So it's a little tricky to find out what is wrong.

If I had to debug this, I would start with fontconfig. Do you know the font that is used in your example? Let's assume it is 'Sans'. Then run
Code:
fc-match --verbose Sans                    # replace Sans by the font that is used in your example

on both machines. fc-match will show various parameters like hinting, anti-alias, and font substitution. Do you see any difference? If you see a difference, enter the statement below on your Gentoo machine:
Code:
eselect fontconfig list

Do you see any reason for the difference in the output of "fc-match --verbose"? You can enable or disable targets using
"eselect fontconfig enable/disable <target>"

If this doesn't help, check font settings of your desktop environment (Gnome, KDE or whatever you use) and of the program your run (firefox, qutebrowser, etc.).

You may also want to read the articles below:
- https://wiki.gentoo.org/wiki/Fontconfig
- https://wiki.archlinux.org/index.php/font_configuration
Back to top
View user's profile Send private message
Hund
n00b
n00b


Joined: 18 Jul 2016
Posts: 40
Location: Sweden

PostPosted: Fri Jul 27, 2018 4:48 am    Post subject: Reply with quote

Ant P. wrote:
If I zoom your screenshot out to 66%, it looks pretty sharp. Are you using any custom screen DPI/zoom settings somewhere?


No, nothing like that. Then both engines should have the same issue.

mike155 wrote:
Quote:
I don't really know how to debug this?

I assume that you configured your Gentoo machine as recommended in the Gentoo handbook. If you didn't do that: ignore my post and read the handbook.

Freetype is used to render fonts. Unfortunately, Freetype can be tweaked with a lot of parameters. If those parameters differ between your Arch Linux machine and your Gentoo machine, output on the screen will be different.

Fontconfig is used to define those parameters. Unfortunately, parameters defined by fontconfig can be overridden by your Desktop GUI and by the program you run (Firefox, Qutebrowser, etc.). So it's a little tricky to find out what is wrong.

If I had to debug this, I would start with fontconfig. Do you know the font that is used in your example? Let's assume it is 'Sans'. Then run
Code:
fc-match --verbose Sans                    # replace Sans by the font that is used in your example

on both machines. fc-match will show various parameters like hinting, anti-alias, and font substitution. Do you see any difference? If you see a difference, enter the statement below on your Gentoo machine:
Code:
eselect fontconfig list

Do you see any reason for the difference in the output of "fc-match --verbose"? You can enable or disable targets using
"eselect fontconfig enable/disable <target>"

If this doesn't help, check font settings of your desktop environment (Gnome, KDE or whatever you use) and of the program your run (firefox, qutebrowser, etc.).

You may also want to read the articles below:
- https://wiki.gentoo.org/wiki/Fontconfig
- https://wiki.archlinux.org/index.php/font_configuration


My fonts works and looks just as I want them to in every application, unless it's a web browser that uses qtwebengine. In my case it's qutebrowser, but I have tried other web browsers that uses the qtwebengine and it's the same issue there.

I don't use any desktop environment and I'm not sure how my font settings for qutebrowser could be relevant here? It's not like they're changing depending on the backend. :) The only difference is that if I start it with the qtwebkit the fonts looks good and if I start it with the backend qtwebengine it looks like crap, just like the screenshot shows.
_________________
Screenshots | dotfiles | Blog
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5593

PostPosted: Fri Jul 27, 2018 5:07 am    Post subject: Reply with quote

Random idea, install eselect-qtgraphicssystem and try each of the settings there. I'm not sure why it'd be doing blurry upscaling by default but you never know...
Back to top
View user's profile Send private message
Hund
n00b
n00b


Joined: 18 Jul 2016
Posts: 40
Location: Sweden

PostPosted: Fri Jul 27, 2018 8:23 am    Post subject: Reply with quote

Ant P. wrote:
Random idea, install eselect-qtgraphicssystem and try each of the settings there. I'm not sure why it'd be doing blurry upscaling by default but you never know...


Code:
# eselect qtgraphicssystem list
Available Qt Graphics Systems:
  (none found)


The font seems to be the same size, it's just bad font rendering, like it's using its own settings for webengine.
_________________
Screenshots | dotfiles | Blog
Back to top
View user's profile Send private message
Hund
n00b
n00b


Joined: 18 Jul 2016
Posts: 40
Location: Sweden

PostPosted: Fri Jul 27, 2018 5:36 pm    Post subject: Reply with quote

Well, I took a gamble and compiled qtwebengine 5.11.1 in the extreme summer heat and it payed off! The font looks like it should now. :D
_________________
Screenshots | dotfiles | Blog
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