Setting DPI

From Pin Eight
Revision as of 21:20, 20 June 2018 by Tepples (talk | contribs) (Setting the DPI: I haven't updated this in a decade. I'm assuming that MATE, a fork of GNOME 2, hasn't changed this. Has it?)
Jump to: navigation, search

Different computer monitors have different pixel densities. These are often expressed in pixels per inch or dots per inch (DPI). If the computer's idea of the monitor's DPI does not match the physical DPI of the connected monitor, or if it does not compensate for differences in seating distance, text and other objects will look too large or too small. Setting DPI is a procedure to make things on a monitor look as large as intended to the viewer.

Computing effective DPI

Personal computer window systems are designed for 96 DPI and a 28-inch seating distance.[1] But for a high-definition television (HDTV), typical seating distances are greater and pixel densities are lower. To compute the effective pixel density:

  1. Multiply the height of the screen in pixels (e.g. 720 or 1080) by 2.04,[2] giving diagonal pixel count.
  2. Divide by the physical diagonal measure of the visible image (e.g. 31.5 inches or 0.8 m), giving pixels per inch or pixels per meter.
  3. Multiply by the physical seating distance (e.g. 72 inches or 1.8 m), giving pixels per seating distance.
  4. Divide it by the standard desktop PC seating distance (always 28 inches), giving pixels per standard inch.

For example, if I'm sitting 1.8 m away from my VX32L, a "32 inch class" 720p TV made by Vizio measuring 0.8 m diagonally, the window system DPI should be set to 720 * 2.04 / 0.8 * 1.8 / 28 = 118 DPI. We can round that to 120, which is in fact the predefined setting for "large fonts" on Windows XP.

The obscurity of this formula has been cited as one of the reasons why HTPCs are for geeks. An ideal home theater PC should include a tool to ask the user for the TV's diagonal measure and seating distance and configure this automatically.

Setting the DPI

Once you have calculated the effective DPI, you need to tell the window system what DPI to assume. Most desktop environments allow this:

Windows 7
See this tutorial on
Xfce in Xubuntu
Start > Settings > Settings Manager > Appearance > Fonts > Custom DPI setting
GNOME 2 (and presumably its fork MATE)
System > Preferences > Appearance > Fonts > Details... > Resolution
Windows XP
Start > Control Panel > Display > Settings > Advanced... > General > DPI setting
Windows Vista, Mac OS X, KDE Plasma, other desktop environment
Suggestions are welcome on the talk page.

This gives you a starting point. Feel free to revise it up or down based on your own visual acuity.

Notes and references

  1. See the definition of a "reference pixel" in this W3C Recommendation: Cascading Style Sheets 2.1, section 4.3.2.
  2. The diagonal measure of a 16:9 TV is the hypotenuse of a triangle whose height is h and whose base is 16h/9. It equals √(12 + (16/9)2)h, or about 2.03973h. This is for 16:9; some other displays are 16:10 (e.g. 1280x800 or 1920x1200, for which use 1.89), 4:3 (e.g. 1024x768, for which use 1.67), or 5:4 (usually 1280x1024, for which use 1.60).