You can edit almost every page by Creating an account. Otherwise, see the FAQ.

DPI scaling in Windows

From EverybodyWiki Bios & Wiki

This article describes the methods used by Windows to scale its items when DPI went beyond 96.

Introduction[edit]

Since the 1980s, the Microsoft Windows operating system has set the default display "DPI" to 96 PPI, while Apple/Macintosh computers have used a default of 72 PPI.[1] These default specifications arose out of the problems rendering standard fonts in the early display systems of the 1980s, including the IBM-based CGA, EGA, VGA and 8514 displays as well as the Macintosh displays featured in the 128K computer and its successors. The choice of 72 PPI by Macintosh for their displays arose from the convenient fact that the official 72 points per inch mirrored the 72 pixels per inch that appeared on their display screens. (Points are a physical unit of measure in typography, dating from the days of printing presses, where 1 point by the modern definition is 1/72 of the international inch (25.4 mm), which therefore makes 1 point approximately 0.0139 in or 352.8 µm). Thus, the 72 pixels per inch seen on the display had exactly the same physical dimensions as the 72 points per inch later seen on a printout, with 1 pt in printed text equal to 1 px on the display screen. As it is, the Macintosh 128K featured a screen measuring 512 pixels in width by 342 pixels in height, and this corresponded to the width of standard office paper (512 px ÷ 72 px/in ≈ 7.1 in, with a 0.7 in margin down each side when assuming 8.5 in × 11 in North American paper size (in Europe, it's 21 cm x 30 cm - called "A4". B5 is 176 millimeters x 250 millimeters)).[citation needed]

A consequence of Apple's decision was that the widely used 10-point fonts from the typewriter era had to be allotted 10 display pixels in em height, and 5 display pixels in x-height. This is technically described as 10 pixels per em (PPEm). This made 10-point fonts be rendered crudely and made them difficult to read on the display screen, particularly the lowercase characters. Furthermore, there was the consideration that computer screens are typically viewed (at a desk) at a distance 30% greater than printed materials, causing a mismatch between the perceived sizes seen on the computer screen and those on the printouts.[citation needed]

Microsoft tried to solve both problems with a hack that has had long-term consequences for the understanding of what DPI and PPI mean.[2] Microsoft began writing its software to treat the screen as though it provided a PPI characteristic that is of what the screen actually displayed. Because most screens at the time provided around 72 PPI, Microsoft essentially wrote its software to assume that every screen provides 96 PPI (because ). The short-term gain of this trickery was twofold:

  • It would seem to the software that more pixels were available for rendering an image, thereby allowing for bitmap fonts to be created with greater detail.
  • On every screen that actually provided 72 PPI, each graphical element (such as a character of text) would be rendered at a size larger than it "should" be, thereby allowing a person to sit a comfortable distance from the screen. However, larger graphical elements meant less screen space was available for programs to draw; indeed, although the default 720-pixel wide mode of a Hercules mono graphics adaptor (the one-time gold standard for high resolution PC graphics) – or a "tweaked" VGA adaptor – provided an apparent 7.5-inch page width at this resolution, the more common and color-capable display adaptors of the time all provided a 640-pixel wide image in their high resolution modes, enough for a bare 6.67 inches at 100% zoom (and barely any greater visible page height – a maximum of 5 inches, versus 4.75). Consequently, the default margins in Microsoft Word were set, and still remain at 1 full inch on all sides of the page, keeping the "text width" for standard size printer paper within visible limits; despite most computer monitors now being both larger and finer-pitched, and printer paper transports having become more sophisticated, the Mac-standard half-inch borders remain listed in Word 2010's page layout presets as the "narrow" option (versus the 1-inch default).[citation needed]
  • Without using supplemental, software-provided zoom levels, the 1:1 relationship between display and print size was (deliberately) lost; the availability of different-sized, user-adjustable monitors and display adaptors with varying output resolutions exacerbated this, as it was not possible to rely on a properly-adjusted "standard" monitor and adaptor having a known PPI. For example, a 12" Hercules monitor and adaptor with a thick bezel and a little underscan may offer 90 "physical" PPI, with the displayed image appearing nearly identical to hardcopy (assuming the H-scan density was properly adjusted to give square pixels) but a thin-bezel 14" VGA monitor adjusted to give a borderless display may be closer to 60, with the same bitmap image thus appearing 50% larger; yet, someone with an 8514 ("XGA") adaptor and the same monitor could achieve 100 DPI using its 1024-pixel wide mode and adjusting the image to be underscanned. A user who wanted to directly compare on-screen elements against those on an existing printed page by holding it up against the monitor would therefore first need to determine the correct zoom level to use, largely by trial and error, and often not be able to obtain an exact match in programs that only allowed integer percent settings, or even fixed pre-programmed zoom levels. For the examples above, they may need to use respectively 94% (precisely, 93.75) – or 95/90, 63% (62.5) – or 60/66.7; and 104% (104.167) – or 105, with the more commonly accessible 110% actually being a less precise match.[citation needed]

Thus, for example, a 10-point font on a Macintosh (at 72 PPI) was represented with 10 pixels (i.e., 10 PPEm), whereas a 10-point font on a Windows platform (at 96 PPI) at the same zoom level is represented with 13 pixels (i.e., Microsoft rounded 13.3333 to 13 pixels, or 13 PPEm) – and, on a typical consumer grade monitor, would have physically appeared around 15/72 to 16/72 of an inch high instead of 10/72. Likewise, a 12-point font was represented with 12 pixels on a Macintosh, and 16 pixels (or a physical display height of maybe 19/72 of an inch) on a Windows platform at the same zoom, and so on.[3] The negative consequence of this standard is that with 96 PPI displays, there is no longer a 1-to-1 relationship between the font size in pixels and the printout size in points. This difference is accentuated on more recent displays that feature higher pixel densities. This has been less of a problem with the advent of vector graphics and fonts being used in place of bitmap graphics and fonts. Moreover, many Windows software programs have been written since the 1980s which assume that the screen provides 96 PPI. Accordingly, these programs do not display properly at common alternative resolutions such as 72 PPI or 120 PPI. The solution has been to introduce two concepts:[2]

  • logical PPI: The PPI that software claims a screen provides. This can be thought of as the PPI provided by a virtual screen created by the operating system.
  • physical PPI: The PPI that a physical screen actually provides.

Software programs render images to the virtual screen and then the operating system renders the virtual screen onto the physical screen. With a logical PPI of 96 PPI, older programs can still run properly regardless of the actual physical PPI of the display screen, although they may exhibit some visual distortion thanks to the effective 133.3% pixel zoom level (requiring either that every third pixel be doubled in width/height, or heavy-handed smoothing be employed).[citation needed]

Before Windows XP[edit]

Since Windows 95, Windows provides an option to set the font size by Display Properties>Settings>Advanced. The default options are 96 DPI (standard), 120 DPI and custom, wherein one can set the desired font zoom. In this mode, only text is scaled, and often improperly, as most applications back then considered 96 DPI as the standard.

File:Windows 2000 scaling at 200%.png
Windows 2000 desktop at 200%, with Windows Explorer and Internet Explorer 5. Click to see full image.

Windows XP[edit]

Windows XP introduced the GDI+ library which allows resolution-independent text scaling. Windows XP scales up the font and UI object sizes as if you'd gone and adjusted your theme's size settings, which can cause some graphical anomalies in some apps that're hardcoded to use default font and icon sizes.,[4] basically scaling up text which causes clipping for those which are not designed to deal with High-DPI applications. [5]

File:Windows XP scaling at 200%.png
Scaling at Windows XP with 200%, with Windows Explorer, Internet Explorer 6, Tablet PC overview and Volume Control in foreground. Click to see full image

Windows Vista, 7 and 8[edit]

Windows Vista includes the now-ubiquitous concept of DPI virtualisation. In this mode, apps are rendered in a 96 DPI buffer off the screen and then upscaled to match the current DPI. This, while ensuring that icons and text stay intact and in the same position, introduces blurriness which is due to the fact that everything is essentially zoomed.

Windows 7 adds the ability to automatically set the DPI level as it can now read the DPI value from the monitor EDID. It is also the first version of Windows which requires only a log-off when changing DPI settings (previously, a restart was required). [6]

Windows 8 introduces the concept of Metro apps, which scale perfectly and do not have any of the problems mentioned above.

Windows 8.1[edit]

The maximum scaling level settable from the Control Panel was increased from 150% to 200%, and it is now possible to independently set scaling level for each monitor.[7]

Windows 10[edit]

File:Mixed-mode scaling.png
Effect on Visual Studio when it is moved from a screen with 125% scaling (top) to one with 100% scaling (bottom). Note the relative fuzziness in the latter.
  1. For the initial Windows 10 release (version 1507), the maximum scaling level was raised to 450%, and there is no more distinction between the possible scaling levels with regards to the type of app. Significant improvements were made to core apps like Windows' File Explorer and the taskbar itself. [8]
  2. The Windows 10 Anniversary Update (version 1607) introduced the concept of mixed-mode DPI scaling, which allows applications to selectively DPI scale certain parts of the UI while allowing Windows to scale less-important parts (like the About screen). Notepad was also made per-monitor DPI aware. [9]
  3. The Creators Update (version 1703) added support for applications to scale using the System (Enhanced) option, which scales GDI content while the rest of the app was scaled using Windows' usual behaviour. As a result, text is often much sharper (though an occasional side-effect is the clipping of text around the edges of the text). This feature does not work with every app (in particular, GDI+ content and images do not scale), but it is still good enough that Microsoft now uses this mode for Microsoft Management Console windows. This version also includes improved DPI awareness, and is the first version that allows user to set the display scaling from application-control to system-controlled (previously, only the reverse was possible). Internet Explorer now scales correctly when moving between displays with different scaling settings.[10]
  4. The April 2018 Update (version 1803) now offers users an option to dynamically try to fix applications when moving between displays with different scaling sizes.

References[edit]

  1. Hitchcock, Greg (2005-10-08). "Where does 96 DPI come from in Windows?". Microsoft Developer Network Blog. Microsoft. Retrieved 2009-11-07.
  2. 2.0 2.1 Hitchcock, Greg (2005-09-08). "Where does 96 DPI come from in Windows?". blogs.msdn.com. Retrieved 2010-05-09.
  3. Connare, Vincent (1998-04-06). "Microsoft Typography – Making TrueType bitmap fonts". Microsoft. Retrieved 2009-11-07.
  4. https://superuser.com/questions/134986/what-is-the-downside-to-windows-xp-style-dpi-scaling-in-windows-7
  5. Howse, Brett. "Scaling Windows - The DPI Arms Race". Retrieved 2018-10-24.
  6. Howse, Brett. "Scaling Windows - The DPI Arms Race". Retrieved 2018-10-24.
  7. https://blogs.windows.com/windowsexperience/2013/07/15/windows-8-1-dpi-scaling-enhancements/
  8. "Display Scaling in Windows 10". Retrieved 2018-10-24.
  9. "Display Scaling changes for the Windows 10 Anniversary Update - Ask the Core Team".
  10. "High-DPI Scaling Improvements for Desktop Applications in the Windows 10 Creators Update (1703) - Windows Developer BlogWindows Developer Blog". blogs.windows.com. Retrieved 2018-09-22.


This article "DPI scaling in Windows" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:DPI scaling in Windows. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.