LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 01-03-2022, 08:12 AM   #1
rempas
Member
 
Registered: Apr 2021
Distribution: Arch (btw)
Posts: 80

Rep: Reputation: Disabled
Font rendering is ugly. Which font and settings to use?


Happy new year everyone! I always thought that Linux had very ugly font rendering and tbh I didn't looked a lot about it. The only time I thought that I had a good font rendering with Linux was when I was using Kubuntu (I thought it was 19.4 but not sure). Here the font rendering was great and the screen was bright and the colors were amazing (so I don't know if it's just the font rendering in the end tho I'm guessing fonts as the pictures and videos seem to be ok).

I'm using Artix Linux (per-configured Arch basically) with the DWM window manager. Is there anyone who had the same problem but was able to fix it? I haven't mess with any of the settings and I'm using the default fonts. So I suppose there may be some things I can do about this problem but no matter what I tried, It will not work. So now I'm back using the default settings after nothing worked. Any ideas?
 
Old 01-03-2022, 09:11 AM   #2
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS, Manjaro
Posts: 5,713

Rep: Reputation: 2721Reputation: 2721Reputation: 2721Reputation: 2721Reputation: 2721Reputation: 2721Reputation: 2721Reputation: 2721Reputation: 2721Reputation: 2721Reputation: 2721
You "nice font rendering" may have been the KDE bits. If it really was the fonts, those are easy to change and examine, so you can find what is good for you. If the real solution is KDE, examining fonts will not help.
 
Old 01-03-2022, 09:16 AM   #3
rempas
Member
 
Registered: Apr 2021
Distribution: Arch (btw)
Posts: 80

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by wpeckham View Post
You "nice font rendering" may have been the KDE bits. If it really was the fonts, those are easy to change and examine, so you can find what is good for you. If the real solution is KDE, examining fonts will not help.
If I'm not wrong, Isn't a desktop environment a collection of utilities (WM, Programs, Settings etc.)? In this case, I don't see anything that I won't be able to use with DWM (except the WM of course).
 
Old 01-03-2022, 11:07 AM   #4
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,677

Rep: Reputation: Disabled
Excuse my ignorance, but does DWM support antialiasing at all? I do see that Xft support was added to dmenu back in May 2015, but not sure if DWM makes use of it. When I last checked it didn't, but that was before 2015.

Last edited by shruggy; 01-04-2022 at 10:46 AM.
 
Old 01-03-2022, 08:53 PM   #5
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,851
Blog Entries: 1

Rep: Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074
Great fonts are the default in high resolution environments. They also look better when you aren't too close to the screen. Are you using a 1366x768 resolution on a desktop display, 19" or more?
Code:
inxi -Ga
would tell us what you should expect.
 
Old 01-03-2022, 11:24 PM   #6
rempas
Member
 
Registered: Apr 2021
Distribution: Arch (btw)
Posts: 80

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by mrmazda View Post
Great fonts are the default in high resolution environments. They also look better when you aren't too close to the screen. Are you using a 1366x768 resolution on a desktop display, 19" or more?
Code:
inxi -Ga
would tell us what you should expect.
Thanks! No, I'm using 1920x1080. Here is the output of the command:

Code:
Graphics:
  Device-1: AMD Baffin [Radeon RX 460/560D / Pro
  450/455/460/555/555X/560/560X]
    vendor: XFX Pine Polaris 21 XL driver: amdgpu v: kernel bus-ID: 10:00.0
    chip-ID: 1002:67ef class-ID: 0300
  Display: server: X.Org 1.21.1.2 driver: loaded: amdgpu display-ID: :0
    screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2")
    s-diag: 582mm (22.9")
  Monitor-1: DisplayPort-0 res: 1920x1080 dpi: 90
    size: 544x303mm (21.4x11.9") diag: 623mm (24.5")
  OpenGL: renderer: AMD Radeon RX 460 Graphics (POLARIS11 DRM 3.42.0
    5.15.12-arch1-1 LLVM 13.0.0)
    v: 4.6 Mesa 21.3.3 direct render: Yes
Is there any useful info here?
 
Old 01-03-2022, 11:30 PM   #7
rempas
Member
 
Registered: Apr 2021
Distribution: Arch (btw)
Posts: 80

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by shruggy View Post
Excuse my ignorance, but does DWM support antialiasing at all? A do see that Xft support was added to dmenu back in May 2015, but not sure if DWM makes use of it. When I last checked it didn't, but that was before 2015.
Excuse you? What??? I should be thankful that you try to help!

So I made a research but I wasn't able to find anything that either says that DWM supports antialiasing or that it doesn't. When you got your info back then? Is there an official source?
 
Old 01-04-2022, 12:22 AM   #8
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,851
Blog Entries: 1

Rep: Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074
Quote:
Originally Posted by rempas View Post
Code:
...
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.0x11.2")
    s-diag: 582mm (22.9")
  Monitor-1: DisplayPort-0 res: 1920x1080 dpi: 90
    size: 544x303mm (21.4x11.9") diag: 623mm (24.5")...
Is there any useful info here?
You have a screen that physically is 24.5" diagonally, but X is treating as a 22.9" display. That means its actual DPI (pixel density) is ~90, while X is applying a density of 96. Fonts don't start getting obviously better automatically until density is around 120 or so, unless you move your eyes away from the screen several inches or more. How close is your face to your screen? Increased density shows up fast though. A 27" 2560x1440 screen has a DPI of 109. That might be enough to make you quite glad if you made the upgrade, especially if you have X apply a logical DPI of 120, as any given physical size font has more pixels as a squared function. e.g. a 12pt font on a 96 DPI screen has a pixel box nominally 8x16=128. To get that 12pt physical size on a 120 DPI screen requires a nominal size 10x20=200, for an increase of 56.25%, for much better glyph shaping naturally.
 
1 members found this post helpful.
Old 01-04-2022, 10:44 AM   #9
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Many components define how fonts look in the end:
  • DPI
  • fonts chosen
  • font substitions
  • fontconfig settings
  • freetype settings

If you are willing to set all this up manually, go ahead.
If not - why not use Ubuntu again?
 
1 members found this post helpful.
Old 01-04-2022, 02:46 PM   #10
rempas
Member
 
Registered: Apr 2021
Distribution: Arch (btw)
Posts: 80

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by mrmazda View Post
You have a screen that physically is 24.5" diagonally, but X is treating as a 22.9" display. That means its actual DPI (pixel density) is ~90, while X is applying a density of 96. Fonts don't start getting obviously better automatically until density is around 120 or so, unless you move your eyes away from the screen several inches or more. How close is your face to your screen? Increased density shows up fast though. A 27" 2560x1440 screen has a DPI of 109. That might be enough to make you quite glad if you made the upgrade, especially if you have X apply a logical DPI of 120, as any given physical size font has more pixels as a squared function. e.g. a 12pt font on a 96 DPI screen has a pixel box nominally 8x16=128. To get that 12pt physical size on a 120 DPI screen requires a nominal size 10x20=200, for an increase of 56.25%, for much better glyph shaping naturally.
Thanks! How Can I make the X server treat my screen with its normal size and the DPI it should had? I'm not sitting to close to the screen but not to far away either. I mostly try to keep a distance tho. Any ideas? If I had to update tho (and I plan to some time in the future), I would go for a 4k 27inch tv or maybe a laptop

Last edited by rempas; 01-04-2022 at 02:49 PM.
 
Old 01-04-2022, 02:48 PM   #11
rempas
Member
 
Registered: Apr 2021
Distribution: Arch (btw)
Posts: 80

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
Many components define how fonts look in the end:
  • DPI
  • fonts chosen
  • font substitions
  • fontconfig settings
  • freetype settings

If you are willing to set all this up manually, go ahead.
If not - why not use Ubuntu again?
Thanks for the info! Well I just tried the latest Kubuntu and it is the same as in my DWM (maybe slightly better, maybe) so I will have to make manually anyway!
 
Old 01-04-2022, 09:39 PM   #12
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,851
Blog Entries: 1

Rep: Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074
Quote:
Originally Posted by rempas View Post
Thanks! How Can I make the X server treat my screen with its normal size and the DPI it should had? I'm not sitting to close to the screen but not to far away either.
The long story is it's complicated, and there are various ways to change it, none of which will affect 100% of applications and DEs. To implement a DPI change across the board, across all apps, means multiple things must be done. The short story is most DE's have a setting somewhere to explicitly set DPI, which will affect most apps. You can test other DPIs using the xrandr utility, e.g. xrandr --dpi 120. It only affects apps opened after it is used. For it to always have an effect requires it be run via an X init script. Another means is via the xrdb variable Xft.dpi, which you can Google to learn about.

Note that fonts will usually look worse if you set a DPI less than 96. Most web fonts are designed so smaller font sizes on low DPI screens, which means few pixels to work with, look their best precisely at 96 DPI, whether or not actual DPI is 96. All else being equal, the more pixels, the better the fonts.
 
1 members found this post helpful.
Old 01-05-2022, 01:11 PM   #13
rempas
Member
 
Registered: Apr 2021
Distribution: Arch (btw)
Posts: 80

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by mrmazda View Post
The long story is it's complicated, and there are various ways to change it, none of which will affect 100% of applications and DEs. To implement a DPI change across the board, across all apps, means multiple things must be done. The short story is most DE's have a setting somewhere to explicitly set DPI, which will affect most apps. You can test other DPIs using the xrandr utility, e.g. xrandr --dpi 120. It only affects apps opened after it is used. For it to always have an effect requires it be run via an X init script. Another means is via the xrdb variable Xft.dpi, which you can Google to learn about.

Note that fonts will usually look worse if you set a DPI less than 96. Most web fonts are designed so smaller font sizes on low DPI screens, which means few pixels to work with, look their best precisely at 96 DPI, whether or not actual DPI is 96. All else being equal, the more pixels, the better the fonts.
Thanks! I found somewhere that the current DPI may not be your screens real DPI and that there is a way to calculate which is the right one for your screen but I don't remember the article...
 
Old 01-05-2022, 04:46 PM   #14
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,851
Blog Entries: 1

Rep: Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074Reputation: 2074
You don't need to calculate anything. Xorg.0.log reports it, and inxi sifts it out:
Code:
> inxi -Gay
Graphics:
  Device-1: Intel 4th Generation Core Processor Family Integrated Graphics
    vendor: Micro-Star MSI driver: i915 v: kernel bus-ID: 00:02.0
    chip-ID: 8086:041e class-ID: 0300
  Display: x11 server: X.Org 1.20.3 driver: loaded: modesetting
    unloaded: fbdev,vesa alternate: intel display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1200 s-dpi: 120 s-size: 406x254mm (16.0x10.0")
    s-diag: 479mm (18.9")
  Monitor-1: HDMI-1 res: 1920x1200 hz: 60 dpi: 94
    size: 518x324mm (20.4x12.8") diag: 611mm (24.1")
  OpenGL: renderer: Mesa DRI Intel HD Graphics 4400 (HSW GT2)
    v: 4.5 Mesa 20.2.4 compat-v: 3.0 direct render: Yes
s-dpi & s-size are the "sizes" employed by the Xorg server. The physical dpi & dimensions don't have 's-'.
 
Old 01-06-2022, 02:19 AM   #15
rempas
Member
 
Registered: Apr 2021
Distribution: Arch (btw)
Posts: 80

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by mrmazda View Post
You don't need to calculate anything. Xorg.0.log reports it, and inxi sifts it out:
Code:
> inxi -Gay
Graphics:
  Device-1: Intel 4th Generation Core Processor Family Integrated Graphics
    vendor: Micro-Star MSI driver: i915 v: kernel bus-ID: 00:02.0
    chip-ID: 8086:041e class-ID: 0300
  Display: x11 server: X.Org 1.20.3 driver: loaded: modesetting
    unloaded: fbdev,vesa alternate: intel display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1200 s-dpi: 120 s-size: 406x254mm (16.0x10.0")
    s-diag: 479mm (18.9")
  Monitor-1: HDMI-1 res: 1920x1200 hz: 60 dpi: 94
    size: 518x324mm (20.4x12.8") diag: 611mm (24.1")
  OpenGL: renderer: Mesa DRI Intel HD Graphics 4400 (HSW GT2)
    v: 4.5 Mesa 20.2.4 compat-v: 3.0 direct render: Yes
s-dpi & s-size are the "sizes" employed by the Xorg server. The physical dpi & dimensions don't have 's-'.
Hmm. Weird... My screen is 24.5 inch and its dpi based on its resolution is 89 (which is what I set). Anyway probably I'll buy a 4k in the future but I heard that these don't play good with Linux somewhere but of course I will not trust any random source online, lol
 
  


Reply

Tags
dpi



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Startup Applications/services in Swami versus Settings Panel: when to use settings in which location? RonCam Bodhi 6 09-23-2018 12:18 AM
Ugly, Ugly OS selection screen still in Kubuntu and Ubuntu rusty2 Linux - Software 7 12-05-2010 04:05 PM
direct rendering: Yes :: (but applications say direct rendering is not possible?) AbsoluteMonkey Fedora 0 12-16-2008 09:44 PM
Font rendering ugly without antialiasing spidernik84 Fedora 1 03-18-2004 09:37 PM
Open Office fonts look ugly (and print ugly too) TheOneAndOnlySM Linux - Software 6 10-17-2003 07:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 06:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration