Resolution independence

Last updated

Resolution independence is where elements on a computer screen are rendered at sizes independent from the pixel grid, resulting in a graphical user interface that is displayed at a consistent physical size, regardless of the resolution of the screen. [1]

Contents

Concept

As early as 1978, the typesetting system TeX due to Donald Knuth introduced resolution independence into the world of computers. The intended view can be rendered beyond the atomic resolution without any artifacts, and the automatic typesetting decisions are guaranteed to be identical on any computer up to an error less than the diameter of an atom. This pioneering system has a corresponding font system, Metafont, which provides suitable fonts of the same high standards of resolution independence.

The terminology device independent file format (DVI) is the file format of Donald Knuth's pioneering TeX system. The content of such a file can be interpreted at any resolution without any artifacts, even at very high resolutions not currently in use.

Implementation

The macOS 10.8.5 System Preferences dialog, non-scaled UI (left) and scaled HighDPI UI (right) OSX ResIndependance Comparison.png
The macOS 10.8.5 System Preferences dialog, non-scaled UI (left) and scaled HighDPI UI (right)

macOS

Apple included some support for resolution independence in early versions of macOS, which could be demonstrated with the developer tool Quartz Debug that included a feature allowing the user to scale the interface. However, the feature was incomplete, as some icons did not show (such as in System Preferences), user interface elements were displayed at odd positions and certain bitmap GUI elements were not scaled smoothly. [2] Because the scaling feature was never completed, macOS's user interface remained resolution-dependent.

On June 11, 2012, Apple introduced the 2012 MacBook Pro with a resolution of 2880×1800 or 5.2 megapixels – doubling the pixel density in both dimensions. [3] The laptop shipped with a version of macOS that provided support to scale the user interface twice as big as it has previously been. This feature is called HighDPI mode in macOS and it uses a fixed scaling factor of 2 to increase the size of the user interface for high-DPI screens. Apple also introduced support for scaling the UI by rendering the user interface on higher or smaller resolution that the laptop's built-in native resolution and scaling the output to the laptop screen. One obvious downside of this approach is either a decreased performance on rendering the UI on a higher than native resolution or increased blurriness when rendering lower than native resolution. Thus, while the macOS's user interface can be scaled using this approach, the UI itself is not resolution-independent.

Microsoft Windows

The GDI system in Windows is pixel-based and thus not resolution-independent. To scale up the UI, Microsoft Windows has supported specifying a custom DPI from the Control Panel since Windows 95. [4] (In Windows 3.1, the DPI setting is tied to the screen resolution, depending on the driver information file.) When a custom system DPI is specified, the built-in UI in the operating system scales up. Windows also includes APIs for application developers to design applications that will scale properly.

GDI+ in Windows XP adds resolution-independent text rendering [5] however, the UI in Windows versions up to Windows XP is not completely high-DPI aware [6] as displays with very high resolutions and high pixel densities were not available in that time frame. Windows Vista and Windows 7 scale better at higher DPIs.

Windows Vista also adds support for programs to declare themselves to the OS that they are high-DPI aware via a manifest file or using an API. [7] [8] For programs that do not declare themselves as DPI-aware, Windows Vista supports a compatibility feature called DPI virtualization so system metrics and UI elements are presented to applications as if they are running at 96 DPI and the Desktop Window Manager then scales the resulting application window to match the DPI setting. Windows Vista retains the Windows XP style scaling option which when enabled turns off DPI virtualization (blurry text) for all applications globally.

Windows Vista also introduces Windows Presentation Foundation. WPF applications are vector-based, not pixel-based and are designed to be resolution-independent.

Windows 7 adds the ability to change the DPI by doing only a log off, not a full reboot and makes it a per-user setting. Additionally, Windows 7 reads the monitor DPI from the EDID and automatically sets the DPI value to match the monitor's physical pixel density, unless the effective resolution is less than 1024 x 768.

In Windows 8, only the DPI scaling percentage is shown in the DPI changing dialog and the display of the raw DPI value has been removed. [9] In Windows 8.1, the global setting to disable DPI virtualization (only use XP-style scaling) is removed. [9] At pixel densities higher than 120 PPI (125%), DPI virtualization is enabled for all applications without a DPI aware flag (manifest) set inside the EXE. Windows 8.1 retains a per-application option to disable DPI virtualization of an app. [9] Windows 8.1 also adds the ability for each display to use an independent DPI setting, although it calculates this automatically for each display. Windows 8.1 prevents a user from forcibly enabling DPI virtualization of an application. Therefore, if an application wrongly claims to be DPI-aware, it will look too small on high-DPI displays in 8.1, and a user cannot correct that. [10]

Windows 10 adds manual control over DPI for individual monitors. In addition, Windows 10 version 1703 brings back the XP-style GDI scaling under a "System (Enhanced)" option. This option combines GDI+'s text rendering at a higher resolution with the usual scaling of other elements, so that text appears crisper than in the normal "System" virtualization mode. [11]

Android

Since Android 1.6 "Donut" (September 2009) [12] Android has provided support for multiple screen sizes and densities. Android expresses layout dimensions and position via the density-independent pixel or "dp" which is defined as one physical pixel on a 160 dpi screen. At runtime, the system transparently handles any scaling of the dp units, as necessary, based on the actual density of the screen in use. [13]

To aid in the creation of underlying bitmaps, Android categorizes resources based on screen size and density:

Illustration of how Android roughly maps actual sizes and densities to generalized sizes and densities. Android maps actual sizes and densities to generalized sizes and densities.png
Illustration of how Android roughly maps actual sizes and densities to generalized sizes and densities.

X Window System

The GNOME 3.10 Control Center's printer settings, non-scaled (left) and scaled (right) GTK 3.10 resolution independence comparison.png
The GNOME 3.10 Control Center's printer settings, non-scaled (left) and scaled (right)

The Xft library, the font rendering library for the X11 system, has a dpi setting that defaults to 75. This is simply a wrapper around the FC_DPI system in fontconfig, but it suffices for scaling the text in Xft-based applications. The mechanism is also detected by desktop environments to set its own DPI, usually in conjunction with the EDID-based DisplayWidthMM family of Xlib functions. The latter has been rendered ineffective in Xorg Server 1.7; since then EDID information is only exposed to XRandR. [14]

In 2013, the GNOME desktop environment began efforts to bring resolution independence ("hi-DPI" support) for various parts of the graphics stack. Developer Alexander Larsson initially wrote [15] about changes required in GTK+, Cairo, Wayland and the GNOME themes. At the end of the BoF sessions at GUADEC 2013, GTK+ developer Matthias Clasen mentioned that hi-DPI support would be "pretty complete" in GTK 3.10 [16] once work on Cairo would be completed. As of January 2014, hi-DPI support for Clutter and GNOME Shell is ongoing work. [17] [18] [19] [20]

Gtk supports scaling all UI elements by integer factors, and all text by any non-negative real number factors. As of 2019, Fractional scaling of the UI by scaling up and then down is experimental. [21]

Other

Although not related to true resolution independence, some other operating systems use GUIs that are able to adapt to changed font sizes. Microsoft Windows 95 onwards used the Marlett TrueType font in order to scale some window controls (close, maximize, minimize, resize handles) to arbitrary sizes. AmigaOS from version 2.04 (1991) was able to adapt its window controls to any font size.[ failed verification ]

Video games are often resolution-independent; an early example is Another World for DOS, which used polygons to draw its 2D content and was later remade using the same polygons at a much higher resolution. 3D games are resolution-independent since the perspective is calculated every frame and so it can vary its resolution.

See also

Related Research Articles

<span class="mw-page-title-main">ClearType</span> Font-rendering technology by Microsoft

ClearType is Microsoft's implementation of subpixel rendering technology in rendering text in a font system. ClearType attempts to improve the appearance of text on certain types of computer display screens by sacrificing color fidelity for additional intensity variation. This trade-off is asserted to work well on LCD flat panel monitors.

<span class="mw-page-title-main">History of the graphical user interface</span>

The history of the graphical user interface, understood as the use of graphic icons and a pointing device to control a computer, covers a five-decade span of incremental refinements, built on some constant core principles. Several vendors have created their own windowing systems based on independent code, but with basic elements in common that define the WIMP "window, icon, menu and pointing device" paradigm.

<span class="mw-page-title-main">Graphics Device Interface</span> Microsoft Windows API

The Graphics Device Interface (GDI) is a legacy component of Microsoft Windows responsible for representing graphical objects and transmitting them to output devices such as monitors and printers. It was superseded by DirectDraw API and later Direct2D API. Windows apps use Windows API to interact with GDI, for such tasks as drawing lines and curves, rendering fonts, and handling palettes. The Windows USER subsystem uses GDI to render such UI elements as window frames and menus. Other systems have components that are similar to GDI; for example: Mac OS has QuickDraw, and Linux and Unix have X Window System core protocol.

<span class="mw-page-title-main">Dots per inch</span> Measure of dot density

Dots per inch is a measure of spatial printing, video or image scanner dot density, in particular the number of individual dots that can be placed in a line within the span of 1 inch (2.54 cm). Similarly, dots per centimetre refers to the number of individual dots that can be placed within a line of 1 centimetre (0.394 in).

The taskbar is a graphical user interface element that has been part of Microsoft Windows since Windows 95, displaying and facilitating switching between running programs. The taskbar and the associated Start Menu were created and named in 1993 by Daniel Oran, a program manager at Microsoft who had previously collaborated on great ape language research with the behavioral psychologist B.F. Skinner at Harvard.

<span class="mw-page-title-main">Typography of Apple Inc.</span>

Apple Inc. uses a large variety of typefaces in its marketing, operating systems, and industrial design with each product cycle. These change throughout the years with Apple's change of style in their products. This is evident in the design and marketing of the company. The current logo is a white apple with a bite out of it, which was first utilized in 2013.

Cairo (graphics) Vector graphics-based software library

Cairo is an open-source graphics library that provides a vector graphics-based, device-independent API for software developers. It provides primitives for two-dimensional drawing across a number of different backends. Cairo uses hardware acceleration when available.

<span class="mw-page-title-main">Font rasterization</span> Process of converting text from vector to raster

Font rasterization is the process of converting text from a vector description to a raster or bitmap description. This often involves some anti-aliasing on screen text to make it smoother and easier to read. It may also involve hinting—information embedded in the font data that optimizes rendering details for particular character sizes.

<span class="mw-page-title-main">GDK</span> Software library

GDK is a library that acts as a wrapper around the low-level functions provided by the underlying windowing and graphics systems. GDK lies between the display server and the GTK library, handling basic rendering such as drawing primitives, raster graphics (bitmaps), cursors, fonts, as well as window events and drag-and-drop functionality.

<span class="mw-page-title-main">Magic User Interface</span> Widget toolkit for AmigaOS

The Magic User Interface is an object-oriented system by Stefan Stuntz to generate and maintain graphical user interfaces. With the aid of a preferences program, the user of an application has the ability to customize the system according to personal taste.

Segoe is a typeface, or family of fonts, that is best known for its use by Microsoft. The company uses Segoe in its online and printed marketing materials, including recent logos for a number of products. Additionally, the Segoe UI font sub-family is used by numerous Microsoft applications, and may be installed by applications. It was adopted as Microsoft's default operating system font, and is also used on Outlook.com, Microsoft's web-based email service. On August 23, 2012, Microsoft unveiled its new corporate logo typeset in Segoe, replacing the logo it had used for the previous 25 years.

<span class="mw-page-title-main">Windows Aero</span> Design language by Microsoft

Windows Aero is the design language introduced in the Microsoft Windows Vista operating system. The changes introduced by Windows Aero encompassed many elements of the Windows interface, with the introduction of a new visual style with an emphasis on animation, glass, and translucency; interface guidelines for phrasing and tone of instructions and other text in applications were available. New cursors and sounds based on Windows Aero design principles were also introduced.

Desktop Window Manager is the compositing window manager in Microsoft Windows since Windows Vista that enables the use of hardware acceleration to render the graphical user interface of Windows.

<span class="mw-page-title-main">Sony Reader</span> Line of e-book readers manufactured by Sony

The Sony Reader (ソニー・リーダー) was a line of e-book readers manufactured by Sony. The first model was the PRS-500 released in September 2006 and was related to the earlier Sony Librie, the first commercial E Ink e-reader in 2004 using an electronic paper display developed by E Ink Corporation. The last model was the PRS-T3, after which Sony announced it would no longer release a new consumer e-reader.

A compositing manager, or compositor, is software that provides applications with an off-screen buffer for each window. The compositing manager composites the window buffers into an image representing the screen and writes the result into the display memory. A compositing window manager is a window manager that is also a compositing manager.

Windows Display Driver Model is the graphic driver architecture for video card drivers running Microsoft Windows versions beginning with Windows Vista.

<span class="mw-page-title-main">Vector-based graphical user interface</span> Computer interface

A vector-based graphical user interface is a mostly conceptual type of graphical user interface where elements are drawn using vector rather than raster information.

<span class="mw-page-title-main">Retina display</span> High-resolution display brand by Apple

Retina display is a branded series of LCDs and OLED displays by Apple Inc. that have a higher pixel density than traditional displays. Apple has registered the term "Retina" as a trademark with regard to computers and mobile devices with the United States Patent and Trademark Office and Canadian Intellectual Property Office. The applications were approved in 2012 and 2014 respectively. The Canadian application cited a 2010 application in Jamaica.

<span class="mw-page-title-main">FireMonkey</span>

FireMonkey is a cross-platform GUI framework developed by Embarcadero Technologies for use in Delphi, C++Builder or Python, using Object Pascal, C++ or Python to build cross-platform applications for Windows, macOS, iOS, and Android. A third-party library, FMX Linux, enables the building of FireMonkey applications on Linux.

References

  1. Carmody, Tim. "Will Resolution Independent Interfaces Ever Come to the Mac?". Wired. ISSN   1059-1028 . Retrieved 2022-05-06.
  2. Apple (April 29, 2005). "Resolution Independent UI Release Notes for Mac OS X v10.4". Apple Developer Connection. Retrieved 2007-03-25.
  3. Anand Lal Shimpi (June 11, 2012). "MacBook Pro Retina Display Analysis". AnandTech. Retrieved 2012-06-12.
  4. Where does 96 DPI come from in Windows?
  5. Why text appears different when drawn with GDIPlus versus GDI
  6. Windows XP and Windows 2000 do not natively support high-DPI screens
  7. "Win32 SetProcessDPIAware Function".
  8. "Windows Vista DPI Settings". 10 December 2006.
  9. 1 2 3 High DPI Settings in Windows
  10. "Scaling Windows - The DPI Arms Race - Print View".
  11. "Improving the high-DPI experience in GDI based Desktop Apps". Windows Developer Blog (MSDN). 19 May 2017. Retrieved 20 February 2020.
  12. "Android 1.6 Platform Highlights".
  13. "Screen compatibility overview".
  14. "Bug #589485 "Ignores physical display size and calculates based ..." : Bugs : xorg-server package : Ubuntu". bugs.launchpad.net.
  15. "HiDPI support in Gnome – Alexander Larsson".
  16. "GTK+ meeting notes | Goings on".
  17. "ThreePointNine/Features/Hidpi - GNOME Wiki!".
  18. "Bug 705915 – Support high dpi displays".
  19. "Bug 705410 – hi-dpi support: Scale UI".
  20. "Bug 705411 – hi-dpi support: Scale window decorations".
  21. "How To Enable HiDPI Fractional Scaling For Wayland Or X11 On Ubuntu 19.04 Disco Dingo". Linux Uprising Blog.