General TC > Programming & Scripting - Unofficial

what dpi should be used for what resolution!?

(1/1)

xor:
what dpi should be used for what resolution!?

https://wiki.archlinux.org/title/xorg#Display_size_and_DPI

Juanito:
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: ---$ xdpyinfo | grep -B2 resolution
screen #0:
  dimensions:    1366x768 pixels (361x203 millimeters)
  resolution:    96x96 dots per inch
--- End code ---

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: ---xrandr | grep "connected pri"
eDP1 connected primary 1366x768+0+0 (normal left inverted right x axis y axis) 280mm x 160mm

--- End code ---

Juanito:
Note also:
--- Code: ---$ xrandr --dpi 125
$ xrandr --dpi 125
$ xdpyinfo | grep -B2 resolution
screen #0:
  dimensions:    1366x768 pixels (277x156 millimeters)
  resolution:    125x125 dots per inch
--- End code ---

..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.

Navigation

[0] Message Index

Go to full version