![20200522 SVG font rendering at different thumbnail sizes](https://upload.wikimedia.org/wikipedia/commons/8/85/20200522_SVG_font_rendering_at_different_thumbnail_sizes.gif)
Font rasterization is the process of converting text from a
vector
Vector most often refers to:
*Euclidean vector, a quantity with a magnitude and a direction
*Vector (epidemiology), an agent that carries and transmits an infectious pathogen into another living organism
Vector may also refer to:
Mathematic ...
description (as found in scalable fonts such as
TrueType font
TrueType is an outline font standardization, standard developed by Apple Inc., Apple in the late 1980s as a competitor to Adobe Inc., Adobe's Type 1 fonts used in PostScript. It has become the most common format for fonts on the classic Mac OS, m ...
s) to a
raster
Raster may refer to:
* Raster graphics, graphical techniques using arrays of pixel values
* Raster graphics editor, a computer program
* Raster scan, the pattern of image readout, transmission, storage, and reconstruction in television and compu ...
or
bitmap
In computing, a bitmap is a mapping from some domain (for example, a range of integers) to bits. It is also called a bit array
A bit array (also known as bitmask, bit map, bit set, bit string, or bit vector) is an array data structure that c ...
description. This often involves some
anti-aliasing Anti-aliasing may refer to any of a number of techniques to combat the problems of aliasing in a sampled signal such as a digital image or digital audio recording.
Specific topics in anti-aliasing include:
* Anti-aliasing filter, a filter used be ...
on screen text to make it smoother and easier to read. It may also involve
hinting
Font hinting (also known as instructing) is the use of mathematical instructions to adjust the display of an outline font so that it lines up with a rasterized grid. At low screen resolutions, hinting is critical for producing clear, legible tex ...
—information embedded in the font data that optimizes rendering details for particular character sizes.
Types of rasterization
The simplest form of rasterization is simple line-drawing with no anti-aliasing of any sort. In Microsoft's terminology, this is called ''bi-level'' (and more popularly "black and white") rendering because no intermediate shades (of gray) are used to draw the glyphs. (In fact, any two colors can be used as foreground and background.)
This form of rendering is also called aliased or "jagged".
This is the fastest rendering method in the sense that it requires the least computational effort. However, it has the disadvantage that rendered glyphs may lose definition and become hard to recognize at small sizes. Therefore, many font data files (such as TrueType) contain
hints that help the rasterizer decide where to render pixels for particularly troublesome areas in the glyphs, or sets of hand-tweaked bitmaps to use at specific pixel sizes.
[Greg Hitchcock (with introduction by Steven Sinofsky)]
Engineering Changes to ClearType in Windows 7
, MSDN blogs, 23 Jun 2009 As prototypical example, all versions of
Microsoft Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
prior to
Windows 95
Windows 95 is a consumer-oriented operating system developed by Microsoft as part of its Windows 9x family of operating systems. The first operating system in the 9x family, it is the successor to Windows 3.1x, and was released to manufacturin ...
(e.g.
Windows 3.1
Windows 3.1 is a major release of Microsoft Windows. It was released to manufacturing on April 6, 1992, as a successor to Windows 3.0.
Like its predecessors, the Windows 3.1 series ran as a shell on top of MS-DOS. Codenamed Janus, Windows 3 ...
) only provided this type of built-in rasterizer.
[About Text Rendering in Windows Internet Explorer 9](_blank)
/ref>
A more complicated approach is to use standard anti-aliasing techniques from computer graphics. This can be thought of as determining, for each pixel at the edges of the character, how much of that pixel the character occupies, and drawing that pixel with that degree of opacity. For example, when drawing a black (000000) letter on a white (FFFFFF) background, if a pixel ideally should be half filled (perhaps by a diagonal line from corner to corner) it is drawn 50% gray (BCBCBC). Over-simple application of this procedure can produce blurry glyphs. For example, if the letter includes a vertical line that should be one pixel wide but falls exactly between two pixels, it appears on screen as a two-pixel-wide gray line. This blurriness trades clarity for accuracy. However, modern systems often force lines to fall within integral pixel coordinates, which makes glyphs look sharper, but also makes lines slightly wider or thinner than they would have looked on a printed sheet of paper.
Most computer displays have pixels made up of multiple subpixels (typically one each for red, green, and blue, which are combined to produce the full range of colours). In some cases, particularly with flat panel displays, it is possible to exploit this by rendering at the subpixel resolution rather than using whole pixels, which can increase the effective resolution of the screen. This is generally known as subpixel rendering
Subpixel rendering is a way to increase the apparent resolution of a computer's liquid crystal display (LCD) or organic light-emitting diode (OLED) display by rendering pixels to take into account the screen type's physical properties. It takes ...
. One proprietary implementation of subpixel rendering is Microsoft's ClearType
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 addit ...
.
Currently used rasterization systems
In modern operating systems, rasterization is normally provided by a shared library
In computer science, a library is a collection of non-volatile resources used by computer programs, often for software development. These may include configuration data, documentation, help data, message templates, pre-written code and subro ...
common to many applications. Such a shared library may be built into the operating system
An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs.
Time-sharing operating systems schedule tasks for efficient use of the system and may also in ...
or the desktop environment
In computing, a desktop environment (DE) is an implementation of the desktop metaphor made of a bundle of programs running on top of a computer operating system that share a common graphical user interface (GUI), sometimes described as a graphica ...
, or may be added later. In principle, each application may use a different font rasterization library, but in practice most systems attempt to standardize on a single library.
Microsoft Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for serv ...
has supported subpixel rendering since Windows XP
Windows XP is a major release of Microsoft's Windows NT operating system. It was released to manufacturing on August 24, 2001, and later to retail on October 25, 2001. It is a direct upgrade to its predecessors, Windows 2000 for high-end and ...
. On the other hand, the standard Microsoft rasterizer without ClearType is an example of one that prioritizes type designer
Type design is the art and process of designing typefaces. This involves drawing each letterform using a consistent style. The basic concepts and design variables are described below.
A typeface differs from other modes of graphic production su ...
's intent of clarity; by forcing text into integral coordinate positions, following the type designer
Type design is the art and process of designing typefaces. This involves drawing each letterform using a consistent style. The basic concepts and design variables are described below.
A typeface differs from other modes of graphic production su ...
's intent of hinting, and even not antialiasing certain fonts at certain sizes, following the type designer
Type design is the art and process of designing typefaces. This involves drawing each letterform using a consistent style. The basic concepts and design variables are described below.
A typeface differs from other modes of graphic production su ...
's intent of the gasp table, it becomes easier to read on the screen, but may appear somewhat different when printed. This has changed with Direct2D/DirectWrite shipping on Windows 7 and Windows Vista platform update.
Mac OS X
macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac (computer), Mac computers. Within the market of ...
's Quartz
Quartz is a hard, crystalline mineral composed of silica (silicon dioxide). The atoms are linked in a continuous framework of SiO4 silicon-oxygen tetrahedra, with each oxygen being shared between two tetrahedra, giving an overall chemical form ...
is distinguished by the use of floating-point positioning ; it does not force glyphs into exact pixel locations, instead using various antialiasing techniques, including subpixel rendering
Subpixel rendering is a way to increase the apparent resolution of a computer's liquid crystal display (LCD) or organic light-emitting diode (OLED) display by rendering pixels to take into account the screen type's physical properties. It takes ...
, to position characters and lines to appear further from the type designer
Type design is the art and process of designing typefaces. This involves drawing each letterform using a consistent style. The basic concepts and design variables are described below.
A typeface differs from other modes of graphic production su ...
's intent of hinting and closer to the original outline. The result is that the on-screen display looks extremely similar to printed output, but can occasionally be difficult to read at smaller point sizes.
Most other systems use the FreeType library, which depending on the render mode, falls anywhere between Microsoft's and Apple's implementations; it supports hinting and anti-aliasing, and optionally performs subpixel rendering.
References
External links
The Raster Tragedy at Low-Resolution Revisited
– Beat Stamm's online book about rasterization, with an emphasis on ClearType
CS 354 Computer Graphics — path rendering; University of Texas at Austin
Texts Rasterization Exposures
The Ails Of Typographic Anti-Aliasing
{{Typography terms
Rasterization
In computer graphics, rasterisation (British English) or rasterization (American English) is the task of taking an image described in a vector graphics format (shapes) and converting it into a raster image (a series of pixels, dots or lines, whic ...