Saffron Type System

Last updated

The Saffron Type System is a system for rendering high-quality scalable type on digital displays. It was developed by Mitsubishi Electric Research Laboratories, and is built on a core of adaptively-sampled distance field (ADF) technology. Saffron has been licensed to Adobe and Monotype and is shipping in numerous products such as the Adobe Flash Player and Amazon Kindle. Saffron has been implemented in both software and hardware.

Contents

Principles

Antialiasing

Saffron performs anti-aliasing by first computing an explicit or implicit adaptively-sampled distance field (ADF) [1] and then mapping distance values to densities. This renders beautiful curves, captures small details, and preserves the nuances of the original font design. Although only one distance sample is needed per pixel to achieve high-quality results, the program can use up to 3 samples per pixel to optimize image quality for LCD displays. The computation of a distance sample requires only linear interpolation and can be updated incrementally from pixel to pixel, thereby making the rendering process simple and efficient. For a more comprehensive treatment of distance-based anti-aliasing, see "A New Framework for Representing, Rendering, Editing, and Animating Type", Ronald N. Perry and Sarah F. Frisken, MERL, 2002.

Explicit and implicit ADFs

Saffron supports two types of ADFs for representing glyphs: explicit ADFs and implicit ADFs. A compile time flag controls the selection of which ADF type to use throughout the system.

Explicit ADF generation uses top-down spatial subdivision to generate a spatial hierarchy of explicit ADF cells, where each explicit ADF cell contains a set of sampled distance values and a reconstruction method; explicit ADF rendering reconstructs the distance field within each explicit ADF cell using its reconstruction method and then maps the reconstructed distances to density values.

In contrast, implicit ADF cells are not generated initially, but are generated on-demand during rendering. More specifically, implicit ADF generation preprocesses an ADFPath (which represents a glyph); it generates implicit ADF cells from the preprocessed ADFPath and renders each implicit ADF cell by first reconstructing the distance field within the implicit ADF cell using its reconstruction method and then mapping the reconstructed distances to density values.

Specific features

Math modes

The Saffron library offers both floating-point and fixed-point implementations of the renderer with identical image quality. The fixed-point implementation is ideal for embedded systems and mobile devices, which often lack floating-point hardware.

Glyph formats

The program supports traditional outline-based fonts, uniform-width stroke-based fonts, and Stylized Stroke Fonts (SSFs). Stroke-based fonts are useful for memory-constrained applications (e.g., embedded systems) because they occupy a much smaller footprint than outline-based fonts and are also faster to render. For example, outline-based fonts containing the GB2312 character set often require well over 3 MB of storage, whereas the same character set can be represented compactly in a stroke-based font with only 250 KB. However, since each stroke has a uniform width, USFs lack the expressiveness and the cultural acceptance of their outline-based counterparts. Saffron supports an improved representation for stroke-based fonts called Stylized Stroke Fonts (SSFs) which provide the expressiveness of traditional outline-based fonts and the small memory footprint of USFs. For details, see “An Improved Representation for Stroke-based Fonts”, SIGGRAPH 2006 Conference Abstracts and Applications, Elena J. Jakubiak, Ronald N. Perry, and Sarah F. Frisken.

Grid fitting

Saffron features an automatic grid fitting system that aligns strong vertical and horizontal edges of glyphs to the pixel grid or to the sub-pixel grid. This grid fitting system provides better contrast, uniform stroke weights, and consistent characteristic distances. Standard Alignment Zones (SAZ) currently support several alphabets, including Arabic, Devanagari, Hebrew, Latin, and Thai. The SAZ grid fitting system requires no changes to existing typefaces and is particularly advantageous when hints are unavailable or have been removed to save space. Unhinted fonts typically occupy significantly less space than their hinted counterparts.

Saffron also features an automatic Multiple Alignment Zone (MAZ) grid fitting system, which is optimized specifically for Asian character sets such as Chinese, Japanese, and Korean. MAZ grid fitting leads to dramatic improvements in rendering quality. The MAZ grid fitting system detects strong horizontal and vertical edges and aligns them to the pixel grid. The MAZ algorithms work with both outline-based fonts and stroke-based fonts, run dynamically during rendering, and operate fully automatically with no user parameters required. The program fully supports application-hinted glyphs, allowing applications to override Saffron's automatic grid fitting algorithms by using their own hints (e.g., TrueType hints) to perform grid fitting.

Character simplification

Chinese, Japanese, and Korean characters often contain many strokes which are difficult to render distinctly at small sizes. Simply aligning horizontal and vertical strokes to the pixel grid (e.g., by rounding each stroke to the nearest grid point) is not sufficient to produce a clear image. Saffron's MAZ grid fitting system performs character simplification (as needed) to ensure that each character remains clear and legible, even at small sizes.

Sub-pixel rendering

The program supports sub-pixel rendering to optimize image quality for LCD displays. Although RGB vertical striped arrays are common, Saffron can also render to alternative pixel patterns such as RGB delta arrays, which are often used on digital camera LCDs. In addition, prototype implementations of Saffron are optimized for Clairvoyante's PenTile patterns. During sub-pixel rendering, the program reduces color fringing artifacts that would otherwise be visible at small sizes.

Continuous stroke modulation

Saffron exploits the inherent properties of distance fields to provide continuous stroke modulation (CSM), the continuous modulation of both stroke weight and edge sharpness. This allows users to tune the appearance of text to suit individual preference. For example, sharper, softer, thinner, and thicker versions of the same typeface can be rendered by using different CSM parameters.

Related Research Articles

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">Raster graphics</span> Matrix-based data structure

In computer graphics and digital photography, a raster graphics represents a two-dimensional picture as a rectangular matrix or grid of square pixels, viewable via a computer display, paper, or other display medium. A raster is technically characterized by the width and height of the image in pixels and by the number of bits per pixel. Raster images are stored in image files with varying dissemination, production, generation, and acquisition formats.

TrueType is an outline font standard developed by Apple in the late 1980s as a competitor to Adobe's Type 1 fonts used in PostScript. It has become the most common format for fonts on the classic Mac OS, macOS, and Microsoft Windows operating systems.

<span class="mw-page-title-main">Rasterisation</span> Conversion of a vector-graphics image to a raster image

In computer graphics, rasterisation or rasterization is the task of taking an image described in a vector graphics format (shapes) and converting it into a raster image. The rasterized image may then be displayed on a computer display, video display or printer, or stored in a bitmap file format. Rasterization may refer to the technique of drawing 3D models, or the conversion of 2D rendering primitives such as polygons, line segments into a rasterized format.

In digital signal processing, spatial anti-aliasing is a technique for minimizing the distortion artifacts (aliasing) when representing a high-resolution image at a lower resolution. Anti-aliasing is used in digital photography, computer graphics, digital audio, and many other applications.

<span class="mw-page-title-main">Voxel</span> Element representing a value on a grid in three dimensional space

In 3D computer graphics, a voxel represents a value on a regular grid in three-dimensional space. As with pixels in a 2D bitmap, voxels themselves do not typically have their position explicitly encoded with their values. Instead, rendering systems infer the position of a voxel based upon its position relative to other voxels.

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

A distance transform, also known as distance map or distance field, is a derived representation of a digital image. The choice of the term depends on the point of view on the object in question: whether the initial image is transformed into another representation, or it is simply endowed with an additional map or field.

<span class="mw-page-title-main">Subpixel rendering</span> Technique for increasing apparent display resolution

Subpixel rendering is used to increase the apparent resolution of a computer's display. It takes advantage of the fact that each pixel on a color liquid-crystal display (LCD) or similar is composed of individual red, green, and blue components — subpixels — with different locations, so that the color also causes the image to shift in space.

A computer font is implemented as a digital data file containing a set of graphically related glyphs. A computer font is designed and created using a font editor. A computer font specifically designed for the computer screen, and not for printing, is a screen font.

<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">Font hinting</span> Technique for improving font rendering

Font hinting 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 text. It can be accompanied by antialiasing and subpixel rendering for further clarity.

In computer graphics, the render output unit (ROP) or raster operations pipeline is a hardware component in modern graphics processing units (GPUs) and one of the final steps in the rendering process of modern graphics cards. The pixel pipelines take pixel and texel information and process it, via specific matrix and vector operations, into a final pixel or depth value; this process is called rasterization. Thus, ROPs control antialiasing, when more than one sample is merged into one pixel. The ROPs perform the transactions between the relevant buffers in the local memory – this includes writing or reading values, as well as blending them together. Dedicated antialiasing hardware used to perform hardware-based antialiasing methods like MSAA is contained in ROPs.

Volume ray casting, sometimes called volumetric ray casting, volumetric ray tracing, or volume ray marching, is an image-based volume rendering technique. It computes 2D images from 3D volumetric data sets. Volume ray casting, which processes volume data, must not be mistaken with ray casting in the sense used in ray tracing, which processes surface data. In the volumetric variant, the computation doesn't stop at the surface but "pushes through" the object, sampling the object along the ray. Unlike ray tracing, volume ray casting does not spawn secondary rays. When the context/application is clear, some authors simply call it ray casting. Because ray marching does not necessarily require an exact solution to ray intersection and collisions, it is suitable for real time computing for many applications for which ray tracing is unsuitable.

<span class="mw-page-title-main">RSX Reality Synthesizer</span> GPU for the PlayStation 3

The RSX 'Reality Synthesizer' is a proprietary graphics processing unit (GPU) codeveloped by Nvidia and Sony for the PlayStation 3 game console. It is a GPU based on the Nvidia 7800GTX graphics processor and, according to Nvidia, is a G70/G71 hybrid architecture with some modifications. The RSX has separate vertex and pixel shader pipelines. The GPU makes use of 256 MB GDDR3 RAM clocked at 650 MHz with an effective transmission rate of 1.3 GHz and up to 224 MB of the 3.2 GHz XDR main memory via the CPU . Although it carries the majority of the graphics processing, the Cell Broadband Engine, the console's CPU, is also used complementarily for some graphics-related computational loads of the console.

<span class="mw-page-title-main">Supersampling</span> Spatial anti-aliasing method

Supersampling or supersampling anti-aliasing (SSAA) is a spatial anti-aliasing method, i.e. a method used to remove aliasing from images rendered in computer games or other computer programs that generate imagery. Aliasing occurs because unlike real-world objects, which have continuous smooth curves and lines, a computer screen shows the viewer a large number of small squares. These pixels all have the same size, and each one has a single color. A line can only be shown as a collection of pixels, and therefore appears jagged unless it is perfectly horizontal or vertical. The aim of supersampling is to reduce this effect. Color samples are taken at several instances inside the pixel, and an average color value is calculated. This is achieved by rendering the image at a much higher resolution than the one being displayed, then shrinking it to the desired size, using the extra pixels for calculation. The result is a downsampled image with smoother transitions from one line of pixels to another along the edges of objects. The number of samples determines the quality of the output.

Multisample anti-aliasing (MSAA) is a type of spatial anti-aliasing, a technique used in computer graphics to remove jaggies.

<span class="mw-page-title-main">Signed distance function</span> Distance from a point to the boundary of a set

In mathematics and its applications, the signed distance function is the orthogonal distance of a given point x to the boundary of a set Ω in a metric space, with the sign determined by whether or not x is in the interior of Ω. The function has positive values at points x inside Ω, it decreases in value as x approaches the boundary of Ω where the signed distance function is zero, and it takes negative values outside of Ω. However, the alternative convention is also sometimes taken instead.

DirectWrite is a text layout and glyph rendering API by Microsoft. It was designed to replace GDI/GDI+ and Uniscribe for screen-oriented rendering and was first shipped with Windows 7 and Windows Server 2008 R2, as well as Windows Vista and Windows Server 2008. DirectWrite is hardware-accelerated when running on top of Direct2D, but can also use the CPU to render on any target, including a GDI bitmap.

Ray marching is a class of rendering methods for 3D computer graphics where rays are traversed iteratively, effectively dividing each ray into smaller ray segments, sampling some function at each step. For example, in volume ray casting the function would access data points from a 3D scan. In Sphere tracing, the function estimates a distance to step next.

This is a glossary of terms relating to computer graphics.

References

  1. "MERL – Adaptively Sampled Distance Fields (ADFs)" (PDF). Merl.com. 2007-09-12. Retrieved 2012-06-13.