You are not logged in.

#1 2023-04-15 11:53:11

fvdnabee
Member
Registered: 2020-07-03
Posts: 7

[SOLVED] Font clarity woes

I recently switched from an nvidia gpu to an amd gpu (and from Xorg to wayland) and font clarify has taken a hit.
It's difficult to describe the regression in text clarify: the reduced clarity is most pronounced for text on a dark background, such as in the terminal and in vim. Especially colored text rendering is noticeably bad when compared to a laptop running ubuntu. In GTK applications the text clarify is generally ok, but not always (see screenshots #2 and #3). I spent some time googling, but it doesn't help that I can't describe the issue (why is the text clarity subpar?). I'm hoping someone more knowledgeable can provide some hints based on the screenshots below. Perhaps the cause is a lingering configuration I made when running the nvidia GPU? Note the nvidia GPU is still in my system (and the drivers are still loaded), but it's only used for machine learning. My desktop environment is displayed by an AMD Radeon RX 6600 (amdgpu driver).

First screenshot: three terminals (gnome-terminal on the top row, alacritty on the bottom row):
https://nc.vdna.be/s/Yy3mP5D5jY2CTPn/preview
The colored text in vim is rendered horribly. But also white text appears to be off.
Notice how the r's are distorted in the lower right terminal. 'jun' also looks off.

Second screenshot: Firefox window Gnome context menu:
Screenshot%20from%202023-04-15%2013-33-52.png
The letters appear 'too thin'.

Third screenshot: italic and blue text in firefox
https://nc.vdna.be/s/w5fPLs2zwsi22C4/preview
Here also the rendering feel off for these texts.

Some relevant settings:
Font settings in gnome tweaks:
https://nc.vdna.be/s/ympsSA86RppmZSQ/preview

❯ fc-conflist
+ /etc/fonts/conf.d/10-hinting-slight.conf: Set hintslight to hintstyle
+ /etc/fonts/conf.d/10-scale-bitmap-fonts.conf: Bitmap scaling
+ /etc/fonts/conf.d/10-sub-pixel-rgb.conf: Enable sub-pixel rendering with the RGB stripes layout
+ /etc/fonts/conf.d/10-yes-antialias.conf: Enable antialiasing
+ /etc/fonts/conf.d/11-lcdfilter-default.conf: Use lcddefault as default for LCD filter
+ /etc/fonts/conf.d/20-unhint-small-vera.conf: Disable hinting for Bitstream Vera fonts when the size is less than 8ppem
+ /etc/fonts/conf.d/30-metric-aliases.conf: Set substitutions for similar/metric-compatible families
+ /etc/fonts/conf.d/40-nonlatin.conf: Set substitutions for non-Latin fonts
+ /etc/fonts/conf.d/45-generic.conf: Set substitutions for emoji/math fonts
+ /etc/fonts/conf.d/45-latin.conf: Set substitutions for Latin fonts
+ /etc/fonts/conf.d/48-spacing.conf: Add mono to the family when spacing is 100
+ /etc/fonts/conf.d/49-sansserif.conf: Add sans-serif to the family when no generic name
+ /etc/fonts/conf.d/50-user.conf: Load per-user customization files
+ /etc/fonts/conf.d/51-local.conf: Load local customization file
+ /etc/fonts/conf.d/60-generic.conf: Set preferable fonts for emoji/math fonts
+ /etc/fonts/conf.d/60-latin.conf: Set preferable fonts for Latin
+ /etc/fonts/conf.d/65-fonts-persian.conf: No description
+ /etc/fonts/conf.d/65-nonlatin.conf: Set preferable fonts for non-Latin
+ /etc/fonts/conf.d/69-unifont.conf: No description
+ /etc/fonts/conf.d/69-urw-bookman.conf: No description
+ /etc/fonts/conf.d/69-urw-c059.conf: No description
+ /etc/fonts/conf.d/69-urw-d050000l.conf: No description
+ /etc/fonts/conf.d/69-urw-fallback-backwards.conf: No description
+ /etc/fonts/conf.d/69-urw-fallback-generics.conf: No description
+ /etc/fonts/conf.d/69-urw-fallback-specifics.conf: No description
+ /etc/fonts/conf.d/69-urw-gothic.conf: No description
+ /etc/fonts/conf.d/69-urw-nimbus-mono-ps.conf: No description
+ /etc/fonts/conf.d/69-urw-nimbus-roman.conf: No description
+ /etc/fonts/conf.d/69-urw-nimbus-sans.conf: No description
+ /etc/fonts/conf.d/69-urw-p052.conf: No description
+ /etc/fonts/conf.d/69-urw-standard-symbols-ps.conf: No description
+ /etc/fonts/conf.d/69-urw-z003.conf: No description
+ /etc/fonts/conf.d/80-delicious.conf: No description
+ /etc/fonts/conf.d/90-synthetic.conf: No description
+ /etc/fonts/fonts.conf: Default configuration file
- /usr/share/fontconfig/conf.avail/05-reset-dirs-sample.conf: Re-define fonts dirs sample
- /usr/share/fontconfig/conf.avail/09-autohint-if-no-hinting.conf: Enable autohinter if font doesn't have any hinting
- /usr/share/fontconfig/conf.avail/09-texlive-fonts.conf: No description
- /usr/share/fontconfig/conf.avail/10-autohint.conf: Enable autohinter
- /usr/share/fontconfig/conf.avail/10-hinting-full.conf: Set hintfull to hintstyle
- /usr/share/fontconfig/conf.avail/10-hinting-medium.conf: Set hintmedium to hintstyle
- /usr/share/fontconfig/conf.avail/10-hinting-none.conf: Set hintnone to hintstyle
- /usr/share/fontconfig/conf.avail/10-hinting-slight.conf: Set hintslight to hintstyle
- /usr/share/fontconfig/conf.avail/10-no-antialias.conf: Disable antialiasing
- /usr/share/fontconfig/conf.avail/10-scale-bitmap-fonts.conf: Bitmap scaling
- /usr/share/fontconfig/conf.avail/10-sub-pixel-bgr.conf: Enable sub-pixel rendering with the BGR stripes layout
- /usr/share/fontconfig/conf.avail/10-sub-pixel-none.conf: Disable sub-pixel rendering
- /usr/share/fontconfig/conf.avail/10-sub-pixel-rgb.conf: Enable sub-pixel rendering with the RGB stripes layout
- /usr/share/fontconfig/conf.avail/10-sub-pixel-vbgr.conf: Enable sub-pixel rendering with the vertical BGR stripes layout
- /usr/share/fontconfig/conf.avail/10-sub-pixel-vrgb.conf: Enable sub-pixel rendering with the vertical RGB stripes layout
- /usr/share/fontconfig/conf.avail/10-unhinted.conf: Disable hinting
- /usr/share/fontconfig/conf.avail/10-yes-antialias.conf: Enable antialiasing
- /usr/share/fontconfig/conf.avail/11-lcdfilter-default.conf: Use lcddefault as default for LCD filter
- /usr/share/fontconfig/conf.avail/11-lcdfilter-legacy.conf: Use lcdlegacy as default for LCD filter
- /usr/share/fontconfig/conf.avail/11-lcdfilter-light.conf: Use lcdlight as default for LCD filter
- /usr/share/fontconfig/conf.avail/20-unhint-small-vera.conf: Disable hinting for Bitstream Vera fonts when the size is less than 8ppem
- /usr/share/fontconfig/conf.avail/25-unhint-nonlatin.conf: Disable hinting for CJK fonts
- /usr/share/fontconfig/conf.avail/30-metric-aliases.conf: Set substitutions for similar/metric-compatible families
- /usr/share/fontconfig/conf.avail/35-lang-normalize.conf: No description
- /usr/share/fontconfig/conf.avail/40-nonlatin.conf: Set substitutions for non-Latin fonts
- /usr/share/fontconfig/conf.avail/45-generic.conf: Set substitutions for emoji/math fonts
- /usr/share/fontconfig/conf.avail/45-latin.conf: Set substitutions for Latin fonts
- /usr/share/fontconfig/conf.avail/48-spacing.conf: Add mono to the family when spacing is 100
- /usr/share/fontconfig/conf.avail/49-sansserif.conf: Add sans-serif to the family when no generic name
- /usr/share/fontconfig/conf.avail/50-user.conf: Load per-user customization files
- /usr/share/fontconfig/conf.avail/51-local.conf: Load local customization file
- /usr/share/fontconfig/conf.avail/60-generic.conf: Set preferable fonts for emoji/math fonts
- /usr/share/fontconfig/conf.avail/60-latin.conf: Set preferable fonts for Latin
- /usr/share/fontconfig/conf.avail/65-fonts-persian.conf: No description
- /usr/share/fontconfig/conf.avail/65-khmer.conf: No description
- /usr/share/fontconfig/conf.avail/65-nonlatin.conf: Set preferable fonts for non-Latin
- /usr/share/fontconfig/conf.avail/69-unifont.conf: No description
- /usr/share/fontconfig/conf.avail/69-urw-bookman.conf: No description
- /usr/share/fontconfig/conf.avail/69-urw-c059.conf: No description
- /usr/share/fontconfig/conf.avail/69-urw-d050000l.conf: No description
- /usr/share/fontconfig/conf.avail/69-urw-fallback-backwards.conf: No description
- /usr/share/fontconfig/conf.avail/69-urw-fallback-generics.conf: No description
- /usr/share/fontconfig/conf.avail/69-urw-fallback-specifics.conf: No description
- /usr/share/fontconfig/conf.avail/69-urw-gothic.conf: No description
- /usr/share/fontconfig/conf.avail/69-urw-nimbus-mono-ps.conf: No description
- /usr/share/fontconfig/conf.avail/69-urw-nimbus-roman.conf: No description
- /usr/share/fontconfig/conf.avail/69-urw-nimbus-sans.conf: No description
- /usr/share/fontconfig/conf.avail/69-urw-p052.conf: No description
- /usr/share/fontconfig/conf.avail/69-urw-standard-symbols-ps.conf: No description
- /usr/share/fontconfig/conf.avail/69-urw-z003.conf: No description
- /usr/share/fontconfig/conf.avail/70-no-bitmaps.conf: Reject bitmap fonts
- /usr/share/fontconfig/conf.avail/70-yes-bitmaps.conf: Accept bitmap fonts
- /usr/share/fontconfig/conf.avail/80-delicious.conf: No description
- /usr/share/fontconfig/conf.avail/90-synthetic.conf: No description

Many thanks!

Last edited by fvdnabee (2023-04-15 15:40:28)

Offline

#2 2023-04-15 12:22:49

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,344

Re: [SOLVED] Font clarity woes

Please replace the oversized images w/ links, use "code" tags instead of "quote" tags and check the behavior on X11.

Offline

#3 2023-04-15 12:54:16

fvdnabee
Member
Registered: 2020-07-03
Posts: 7

Re: [SOLVED] Font clarity woes

In X11 the text clarify also suffers in vim: https://nc.vdna.be/s/tkkfJcerYenfAsH/preview

Offline

#4 2023-04-15 13:14:27

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,344

Re: [SOLVED] Font clarity woes

Have you looked at the screenshot(s) w/ a different device?
The fonts are antialiased, but not bleeding their edges or so.

The only scrot that looks actually bad is the first one (w/ the three terminals) and it looks to be hinting or subpixel renderign related.

Try full hinting and standard antialiasing (one by one) and nb. that changing those settings will typically only affect processes started afterwards.
(In theory the change is interceptable, but virtually no client implements that)

Offline

#5 2023-04-15 15:40:00

fvdnabee
Member
Registered: 2020-07-03
Posts: 7

Re: [SOLVED] Font clarity woes

When swapping the GPU's, I also switched from a DP cable to a DIsplayport to HDMI cable. Turns out this cable in combination with my GPU/monitor is the cause of the blurry text. I'm back on the DP-DP cable and the text clarity is as expected.

I tried figuring out whether the DP-HDMI cable causes the AMD gpu to enable DSC, but can't find any mention of DSC in xrandr --verbose nor in dmesg. The datasheet of the cable mentions the conversion to HDMI is handled by the following IC `NX3301B 4K/30HZ (DPIC-020A)`. When I switch the output to 4K/30Hz, the text clarity issue is also resolved (at the expensive of refresh rate). I guess the cable can go in the bin then. Will mark the thread as SOLVED.

Offline

Board footer

Powered by FluxBB