The Right DPI

Menu

TL;DR Do not assume X11 is using the correct DPI for your screen. If your fonts look blurry and ugly, X11 might be using the wrong DPI value.

I recently installed ArchLinux on my brand new Lenovo T590. (Second Thinkpad in a row and I couldn’t be happier with the choice.)

The new computer has a FHD screen (1920x1080) and when I first started using it I was rather disappointed with font rendering: fonts looked blurry and I could see anti-aliasing trying its best but not being quite up to the point. Lucida fonts, in particular, looked so ugly I couldn’t use them.

Coming from a UHD display I thought the problem was with the hardware.

ArchWiki to the rescue! By consulting the page about Xorg

Section "Monitor"
   Identifier    "<default monitor>"
   # Is it better to fake actual size to ensure a multiple of 96, such as 146
   #   DisplaySize   344 194
   DisplaySize   334 187
EndSection

reboot … and voilĂ , nice fonts all over the screen!

Footnotes:

1

it is actually the other way around: X11 set dpi to 96 and since the monitor is 1920 pixels wide, it must be 50cm long

Author: Adolfo Villafiorita

Last modified: 2021-01-13 Wed 18:46 (created on: 2021-01-13 Wed 00:00)

Published: 2021-01-13 Wed 18:51