Tiny Core Linux

General TC => Programming & Scripting - Unofficial => Topic started by: xor on October 31, 2022, 01:19:31 AM

Title: what dpi should be used for what resolution!?
Post by: xor on October 31, 2022, 01:19:31 AM
what dpi should be used for what resolution!?

https://wiki.archlinux.org/title/xorg#Display_size_and_DPI
Title: Re: what dpi should be used for what resolution!?
Post by: Juanito on October 31, 2022, 04:23:51 AM
This is perhaps more complicated than it looks.

If you use Xorg without configuration, it should use the native resolution of your monitor. For my laptop:
Code: [Select]
$ xdpyinfo | grep -B2 resolution
screen #0:
  dimensions:    1366x768 pixels (361x203 millimeters)
  resolution:    96x96 dots per inch

Note that without configuration, Xorg forces dpi=96.

..but my screen is not 361x203mm, it is approximately 276x154mm, which equates to 125dpi (calculated on the screen diagonal).

Edit: this should give the correct monitor dimensions:
Code: [Select]
xrandr | grep "connected pri"
eDP1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 280mm x 160mm
Title: Re: what dpi should be used for what resolution!?
Post by: Juanito on October 31, 2022, 04:43:53 AM
Note also:
Code: [Select]
$ xrandr --dpi 125
$ xrandr --dpi 125
$ xdpyinfo | grep -B2 resolution
screen #0:
  dimensions:    1366x768 pixels (277x156 millimeters)
  resolution:    125x125 dots per inch

..made no discernible difference to the display.

Edit: setting "Xft.dpi: 125.0" in ~/.Xdefaults makes the fonts bigger in fluxbox, but not flwm, which doesn't use libXft.