Measuring distances on screen across different displays, resolutions, scaling factors and for different application cases is non-trivial. Beginning with v.0.10.0, ScreenRuler provides enhanced mechanisms for automatic screen resolution adaptation and ruler calibration. This document provides background on these features as well as guidance on when and how to use them effectively.

Important: Before reading on, please make sure to have ScreenRuler v.0.10.0 (2022-09) or later installed.

Why is this relevant?

As monitors are diverse in screen resolutions and pixel densities, various factors have to be considered when measuring distances on screen, most importantly:

  • The raw pixel density of a display, i.e. how many screen pixels fit into one physical inch, measured in dots-per-inch (DPI), depends on the used monitor device.
  • The relation between raw pixel density and virtual/logical pixel density, as often, pixel densities appear to software and users as unified across devices while monitors have different physical characteristics in reality. For Windows, display scaling for high-DPI monitors additionally comes in as an additional issue.
  • Mappings between pixel scales and physical units (such as inches, centimeters, …) may have to be adjusted depending on monitor or use case (e.g. when measuring images or documents on screen).

Wikipedia provides a nice write-up with further details on monitor DPI and the highlighted issues here.

What does ScreenRuler provide?

Since v.0.10, ScreenRuler is per-monitor DPI-aware by default, i.e. it …

  • … automatically and dynamically scales the UI according to Windows’ display scaling settings of the current monitor
  • … can adjust ruler scales according to Monitor pixel densities

The latter feature can be configured in the app via the ruler calibration dialog, which can be accessed either via the context menu (Calibrate Ruler) or by pressing Ctrl+K.

Ruler calibration provides multiple built-in DPI scaling behaviors with different characteristics that are suitable for different use cases:

  • Use scaled pixels: Ruler scales will be based on the virtual/logical DPI values provided by Windows (i.e. 96dpi by default). Additionally, the ruler scale will be scaled corresponding to Windows’ display settings for scaling on high-DPI monitors (e.g. assuming 120dpi for a scaling of 125%).
    • When to use? Use this mode to measure items that are scaled by the OS and/or unaware of monitor pixel densities. Measurements in this mode might not correspond to physical “off-screen” dimensions.
  • Automatic (per-monitor): Ruler scales will be based on the raw DPI values of each monitor, as provided by the OS. Note that raw DPI values might differ slightly for each monitor and might not match virtual or scaled DPI values directly. In this mode, the ruler scale is dynamically adjusted to the raw pixel density of the current monitor.
    • When to use? This mode should provide the most accurate mapping from physical “off-screen” dimensions to “on-screen” dimensions. Use this mode to accurately measure items in physical dimensions (such as inches, centimeters etc.)
  • Manual: Manually specify monitor DPI values on which ruler scales will be based. There are two ways to do this: You can directly specify a custom DPI value in the ruler calibration dialog under Monitor DPI -> Horizontal Scaling (DPI)/Vertical Scaling (DPI). Or, you can calibrate ruler scales from the current dimensions of the ruler under the Measuring Unit tab (see Step-by-step guides). Ruler scales will always be computed from this fixed pixel density value independent of current display scaling or monitor DPI.
    • When to use? Use this mode to calibrate ruler scales independent of OS-based automatic display scaling or monitor pixel densities. Useful e.g. if automatic scale adaptations fail or to adjust to an application-specific scale.
  • Manual (per-monitor): Similar to Manual, however, instead of specifying one global DPI value, allows different configurations for each connected monitor. Select the monitor to calibrate from the dropdown below the scaling behavior selection.
    • When to use? To calibrate ruler scales in multi-display setups where each display requires a different calibration. Especially useful if automatic scale adaptations fail.

Step-by-step guides

Calibrate ruler scales to given reference length

Using the ruler calibration dialog, you can calibrate the ruler scales to existing reference lengths, either on-screen or off-screen:

  1. Open the ruler calibration dialog (by pressing Ctrl+K) and select Manual from the DPI scaling behavior dropdown.
  2. In the tab control, switch to Measuring Unit.
  3. Select the measuring unit of interest from the appearing dropdown.
  4. Now, using the standard manipulation methods, adjust the size of the ruler tool to the desired dimensions (e.g. to match a given scale or a given item on or off screen).
  5. Finally, using the given fields in the calibration dialog, define to which dimensions (horizontal and vertical) the current size of the ruler tool should correspond in the selected measuring unit.

ScreenRuler will adjust ruler scale computation such that the defined dimensions match the current size of the ruler tool.

Set monitor-specific scaling in multi-display setup

When multiple monitors are attached to a system, each monitor might have a different pixel density or display scaling. In case automatic scaling fails or if custom calibration is required, you can use the ruler calibration dialog to manually specify DPI values for each connected monitor:

  1. Open the ruler calibration dialog (by pressing Ctrl+K) and select Manual (per-monitor) from the DPI scaling behavior dropdown.
  2. In the dropdown listing the connected monitor devices, select the monitor you wish to configure. You can identify the connected monitors by pressing the button labeled with ? to the right of the dropdown.
  3. In the tab control, switch to Monitor DPI.
  4. In the numeric selection box to the right of the label Horizontal Scaling, select the desired DPI value. Note how the ruler scale is directly updated whenever this value changes.
  5. If required, select a different DPI value for the vertical direction. To do this, tick the checkbox to the left of Vertical Scaling.