The parameter that controls user interface and fonts DPI is scaling-factor and the font rendering parameter is text-scaling factor. These parameters can be modified by the Displays application, by GNOME Tweak Tool and by Unity Tweak Tool, but none of these allows you to set a value with 3-4 decimals.
If you don't know what your display DPI is, simply measure its width in inches and divide your horizontal resolution in pixels by the measured value. Another way of getting the width and height of your display is by running xrandr and looking at the connected monitor. Example output: DVI-I-2 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm.
If I convert 477 milimeters to inches I get 477 / 25.4 = 18.78 inches. The horizontal width is 1080 pixels, so the DPI is 1920 / 18.78 = 102.24. To find scaling factor value, I divide 102.24 by 96 and the result is 1.065.
Dconf Editor allows you to set this value with 16 decimals. It can be installed by running sudo apt-get install dconf-editor in a terminal. These parameters are found in org.gnome.desktop.interface.
I didn't change the interface DPI (scaling-factor) as my DPI is not so high to make the interface look too small. I only changed fonts DPI (text-scaling-factor) as I like for the user interface the font Ubuntu size 8 which looked too small.
What are the effects
- If you open a LibreOffice Writer document at 100% size and overlay a sheet of paper on the screen it should be exactly the same size.
- A font with the size equal to screen DPI will have a height of 1 inch on the display.
- Usually (depends on program - e.g. qpdfview follows DPI, Evince doesn't) documents displayed at 100% are the same size as if they were on paper.
- whtyger. Answer on How to find and change the screen DPI? available on AskUbuntu.com (licensed under CC-BY-SA 3.0)