Saffron Type System
The Saffron Type System is a system for rendering high-quality
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
Glyph formats
The program supports traditional
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
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
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.
References
- ^ "MERL – Adaptively Sampled Distance Fields (ADFs)" (PDF). Merl.com. 2007-09-12. Retrieved 2012-06-13.
- Adaptively Sampled Distance Fields: A General Representation of Shape for Computer Graphics, SIGGRAPH 2000 Conference Proceedings, Sarah F. Frisken, Ronald N. Perry, Alyn P. Rockwood, and Thouis R. Jones.
- A New Framework for Representing, Rendering, Editing, and Animating Type, Ronald N. Perry and Sarah F. Frisken, MERL, 2002
- An Improved Representation for Stroke-based Fonts, SIGGRAPH 2006 Conference Abstracts and Applications, Elena J. Jakubiak, Ronald N. Perry, and Sarah F. Frisken.
- U.S. Patent: Detail-Directed Hierarchical Distance Fields, Sarah Frisken, Ronald Perry, and Thouis Jones
- U.S. Patent: Method for Antialiasing an Object Represented as a Two-Dimensional Distance Field in Image-Order, Ronald Perry and Sarah Frisken
- U.S. Patent: Method for Antialiasing an Object Represented as a Two-Dimensional Distance Field in Object-Order, Sarah Frisken and Ronald Perry
- U.S. Patent: Method and Apparatus for Antialiasing a Set of Objects Represented as a Set of Two-Dimensional Distance Fields in Image-Order, Ronald Perry and Sarah Frisken
- U.S. Patent: Method and Apparatus for Antialiasing a Set of Objects Represented as a Set of Two-Dimensional Distance Fields in Object-Order, Sarah Frisken and Ronald Perry
- U.S. Patent: Methods for Generating an Adaptively Sampled Distance Field of an Object with Specialized Cells, Sarah Frisken and Ronald Perry
- U.S. Patent: Method and Apparatus for Rendering Cell-Based Distance Fields Using Texture Mapping, Ronald Perry and Sarah Frisken
External links
- Saffron website
- Adaptively Sampled Distance Fields (ADF) Papers
- Mitsubishi Electric Research Laboratories (MERL) website
- Portal website for Mitsubishi companies