Subpixel rendering
This article is written like a personal reflection, personal essay, or argumentative essay that states a Wikipedia editor's personal feelings or presents an original argument about a topic. (February 2024) |
Subpixel rendering is a method used to increase the effective resolution of a color
Subpixel rendering is primarily used for text rendering on standard DPI displays.
Despite the inherent color anomalies, it can also be used to render general graphics.
History
The origin of subpixel rendering as used today remains controversial. Apple Inc., IBM, and Microsoft patented various implementations with certain technical differences owing to the different purposes their technologies were intended for.[1]
Microsoft had several patents in the United States on subpixel rendering technology for text rendering on RGB Stripe layouts. The patents 6,219,025, 6,239,783, 6,307,566, 6,225,973, 6,243,070, 6,393,145, 6,421,054, 6,282,327, 6,624,828 were filed between October 7, 1998, and October 7, 1999, and expired on July 30, 2019.[2] Analysis of the patent by FreeType[3] indicates that the idea of subpixel rendering is not covered by the patent, but by the actual filter used as a last step to balance the color. Microsoft's patent describes the smallest filter possible that distributes each subpixel value to an equal amount of R,G, and B pixels. Any other filter will either be blurrier or will introduce color artifacts.
Apple was able to use it in Mac OS X due to a patent cross-licensing agreement.[4]
Characteristics
A single pixel on a color display is made of several subpixels, typically three arranged left-to-right as red, green, and blue (RGB). The components are easily visible when viewed with a small magnifying glass, such as a loupe. These pixel components appear as a single color to the human eye because of blurring by optics and spatial integration by nerve cells in the eye. However, the eye is much more sensitive to the location.[clarification needed] Therefore, turning on the G and B of one pixel and the R of the next pixel to the right will produce a white dot, but it will appear to be 1/3 of a pixel to the right of the white dot that would be seen from the RGB of only the first pixel. Subpixel rendering takes advantage of this to provide three times the horizontal resolution of the rendered image, though it has to blur this image to produce the correct color by ensuring the same amount of red, green, and blue are turned on as when no subpixel rendering is being done.
Subpixel rendering does not necessitate the use of antialiasing, and gives a smoother result regardless of whether antialiasing is used or not [5] since it artificially increases the resolution. However, it introduces color aliasing since subpixels are colored. Subsequent filtering applied to remove the color artifacts is a form of antialiasing, although its purpose is not smoothing jagged shapes as in conventional antialiasing.
Subpixel rendering requires the software to know the layout of the subpixels. The most common reason it is wrong is monitors that can be rotated 90 (or 180) degrees, though monitors are manufactured with other arrangements of the subpixels, such as BGR or in triangles, or with 4 colors like RGBW squares. On any such display the result of incorrect subpixel rendering will be worse than if no subpixel rendering was done at all (it will not produce color artifacts, but it will produce noisy edges).
Implementations
Apple II
This section possibly contains original research. (August 2014) |
Gibson's example claims that because two adjacent bits make a white block, there are in fact two bits per pixel: one which activates the purple left half of the pixel, and the other which activates the green right half of the pixel. If the programmer instead activates the green right half of a pixel and the purple left half of the next pixel, then the result is a white block that is 1/2 pixel to the right, which is indeed an instance of subpixel rendering. However, it is not clear whether any programmers of the Apple II have considered the pairs of bits as pixels—instead calling each bit a pixel.
The flag bit in each byte affects color by shifting pixels half a pixel-width to the right. This half-pixel shift was exploited by some graphics software, such as HRCG (High-Resolution Character Generator), an Apple utility that displayed text using the high-resolution graphics mode, to smooth diagonals.
ClearType
FreeType
FreeType, the library used by most current software on the X Window System, contains two open source implementations. The original implementation uses the ClearType antialiasing filters and carries the following notice: "The colour filtering algorithm of Microsoft's ClearType technology for subpixel rendering is covered by patents; for this reason the corresponding code in FreeType is disabled by default. Note that subpixel rendering per se is prior art; using a different colour filter thus easily circumvents Microsoft's patent claims."[3][2]
FreeType offers a variety of color filters. Since version 2.6.2, the default filter is light, a filter that is both normalized (value sums up to 1) and color-balanced (eliminate color fringes at the cost of resolution).[11]
Since version 2.8.1, a second implementation exists, called Harmony, that "offers high quality LCD-optimized output without resorting to ClearType techniques of resolution tripling and filtering". This is the method enabled by default. When using this method, "each color channel is generated separately after shifting the glyph outline, capitalizing on the fact that the color grids on LCD panels are shifted by a third of a pixel. This output is indistinguishable from ClearType with a light 3-tap filter."[12] Since the Harmony method does not require additional filtering, it is not covered by the ClearType patents.
CoolType
macOS
See also
- Font rasterization – Process of converting text from vector to raster
- Kell factor
- PenTile matrix family – Electronic device display
- Sub-pixel resolution
References
- ^ John Markoff, "Microsoft's Cleartype Sets Off Debate on Originality Archived 2017-04-21 at the Wayback Machine", New York Times, December 7, 1998
- ^ a b David Turner (June 1, 2007). "ClearType Patents, FreeType and the Unix Desktop: an explanation". Archived from the original on 2009-03-31. Retrieved April 9, 2009.
- ^ a b "FreeType and Patents". FreeType.org. February 13, 2018. Archived from the original on 2018-11-10. Retrieved November 29, 2018.
- ^ "LCD Rendering Patches". September 24, 2006. Archived from the original on 2011-06-03. Retrieved April 9, 2009.
- ^ "A Treatise on Font Rasterisation With an Emphasis on Free Software". 2010-09-15. Retrieved 2023-11-11.
- ^ "GRC - The Origins of Sub-Pixel Font Rendering". grc.com. Archived from the original on 2006-03-06. Retrieved 2006-03-02.
- ^ David Turner (24 Sep 20:00 2006) LCD Rendering Patches Archived 2007-02-08 at the Wayback Machine
- ^ ICT Bill Gates 1998 keynote comdex 1998, archived from the original on 2021-11-30, retrieved 2021-11-30
- ^ Platt, John; Keely, Bert; Hill, Bill; Dresevic, Bodin; Betrisey, Claude; Mitchell, Don P.; Hitchcock, Greg; Blinn, Jim; Whitted, Turner (2000-05-01). "Displaced Filtering for Patterned Displays": 296–299. Archived from the original on 2021-11-30. Retrieved 2021-11-30.
{{cite journal}}
: Cite journal requires|journal=
(help) - ^ Greg Hitchcock (with introduction by Steven Sinofsky) "Engineering Changes to ClearType in Windows 7 Archived 2012-12-18 at the Wayback Machine", MSDN blogs, June 23, 2009
- ^ "On slight hinting, proper text rendering, stem darkening and LCD filters". freetype.org. Archived from the original on 2020-11-12. Retrieved 2020-11-14.
- ^ Lemberg, Werner (2017-09-16). "Announcing FreeType 2.8.1". Archived from the original on 2019-11-16. Retrieved 2019-04-30.
- ^ Felici, James (April 2000) "ClearType, CoolType: The Eyes Have It", Seybold Report on Internet Publishing, Vol. 4 Issue 8
- ^ "The Ails Of Typographic Anti-Aliasing". November 2, 2009. Archived from the original on 2014-08-09. Retrieved 2014-08-11.
External links
- Ron Feigenblatt's remarks on Microsoft ClearType
- Pixel Borrowing, ClearType and Antialiasing at the Wayback Machine (archived October 12, 2007)
- Subpixel Explorer
- Texts Rasterization Exposures Article from the Anti-Grain Geometry Project.
- Engelhardt, Thomas (2013). "Low-Cost Subpixel Rendering for Diverse Displays". Computer Graphics Forum. 33 (1): 199–209.