Pixel Density and Usability
Pixel Density and Usability
Pixel density, commonly referred to as dots per inch, or dpi, consists of two components: screen resolution and physical screen size. In Windows Vista, dpi settings are stated as pixels per inch. For example, the default setting of 96 dpi implies that there are 96 pixels per horizontal inch of screen area. Ideally, the dpi setting in Control Panel will correspond to the physical measurements of the screen: for example, a screen that actually has 96 pixels per horizontal inch would be perfectly calibrated with a 96-dpi setting.
The term high dpi refers to pixel density that's greater than 96 dpi. Mobile PCs, which are designed for viewing at a close distance, feature high-dpi screens. The increased detail of a high-dpi screen improves readability at close reading distances.
You need to adjust the size of your user interface elements on a high-dpi screen. Without accounting for dpi, it's impossible to predict the physical size of an image that appears on-screen. In the past, mobile PCs with high-dpi screens typically rendered interface elements smaller than their designers intended, which reduced usability and readability.
System DPI
Windows Vista provides a system dpi setting that, in theory, should closely match the physical dpi of the screen. Assuming the system dpi is set correctly, an application can adjust its user interface elements to appear at the appropriate physical size, regardless of the screen size or the resolution. For example, an application could draw a button at a specific physical size, and the button would appear to be the same physical size on different monitors.
Note If multiple monitors are present, they will share the same system dpi setting.
The default system dpi setting of 96 dpi is consistent with a screen that measures 14" diagonally, with a 1024x768 resolution.
Improved DPI awareness in Windows Vista
In versions of Microsoft Windows prior to Windows Vista, the system dpi was unlikely to model the physical dpi of the screen. Buried in Display Settings, dpi settings were hard for users to find and understand, and Windows shell visuals and applications often appeared incorrectly at values that were different from the default setting of 96 dpi. As a result, users typically left the dpi setting at 96 and ran their high-resolution LCD screens at a lower resolution, which reduced screen real estate and image quality, but improved readability.
Windows Vista introduces a number of improvements that better support high-dpi displays:
- Common controls and other Windows user interface elements are now rendered correctly in a high-dpi setting. Shell visuals, such as icons, scale appropriately.
- A simplified interface enables users to select the normal DPI or a large DPI with a live preview.
Automatic DPI scaling
Prior to Windows Vista, few applications factored dpi settings when rendering their user interface. As a result, on high-resolution displays, many users found the user interface difficult to read. Windows Vista has addressed this problem with legacy applications by providing automatic scaling of application visuals for programs that do not report as dpi-aware. This feature is part of Desktop Windows Manager and is active on mobile PCs that run the Windows Aero theme. It also targets mobile PCs with graphic accelerators.
Mobile PC applications cannot rely on this feature. They need to implement their own dpi scaling. Scaling does not occur in power-saving modes, which are typically used on mobile PCs. Also, users can disable dpi scaling.
Creating a DPI-Aware Application describes how to cancel automatic dpi scaling and adjust user interface elements to scale appropriately to the system dpi. By following the guidelines in Creating a DPI-Aware Application, you can improve the readability, usability, and visual appeal of user interfaces on a high-dpi display.
Send comments about this topic to Microsoft
Build date: 12/5/2008