Saffron Type System
Encyclopedia
The Saffron Type System is a system for rendering high-quality scalable type on digital
Digital
A digital system is a data technology that uses discrete values. By contrast, non-digital systems use a continuous range of values to represent information...

 displays. Developed by Mitsubishi Electric Research Laboratories (MERL), Saffron is built on a core of adaptively-sampled distance field (ADF) technology. Saffron has been licensed to Adobe and is shipping in all Flash
Adobe Flash
Adobe Flash is a multimedia platform used to add animation, video, and interactivity to web pages. Flash is frequently used for advertisements, games and flash animations for broadcast...

-based products, including Adobe Flash CS3 and CS4, and Adobe Flash Player
Adobe Flash Player
The Adobe Flash Player is software for viewing multimedia, Rich Internet Applications and streaming video and audio, on a computer web browser or on supported mobile devices. Flash Player runs SWF files that can be created by the Adobe Flash authoring tool, by Adobe Flex or by a number of other...

.

Antialiasing

Saffron performs anti-aliasing
Anti-aliasing
In digital signal processing, spatial anti-aliasing is the technique of minimizing the distortion artifacts known as aliasing when representing a high-resolution image at a lower resolution...

 by first computing an explicit or implicit adaptively-sampled distance field (ADF) and then mapping distance values to densities. This distance-based antialiasing approach renders beautiful curves, captures small details, and preserves the nuances of the original font design. No special mechanisms are needed to avoid dropout. Although only one distance sample is needed per pixel
Pixel
In digital imaging, a pixel, or pel, is a single point in a raster image, or the smallest addressable screen element in a display device; it is the smallest unit of picture that can be represented or controlled....

 to achieve high-quality results, Saffron 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.

Explicit and implicit ADFs

Saffron supports two types of ADFs for representing glyphs: explicit ADFs and implicit ADFs. A compile time Boolean 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 during generation (they are generated on-demand during rendering). More specifically, implicit ADF generation preprocesses an ADFPath (which represents a glyph); implicit ADF rendering generates implicit ADF cells from the preprocessed ADFPath and renders each implicit ADF cell by 1) reconstructing the distance field within the implicit ADF cell using its reconstruction method and 2) mapping the reconstructed distances to density values.

Math modes

The Saffron library offers both floating-point and fixed-point
Fixed-point arithmetic
In computing, a fixed-point number representation is a real data type for a number that has a fixed number of digits after the radix 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

Saffron 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.

Stylized stroke fonts

Outline-based Asian fonts often require 5 to 15 MB of storage, which is problematic for memory-constrained devices such as cell phones. In contrast, uniform-width stroke-based fonts (USFs) require significantly less storage — for example, the GB2312 character set can be represented compactly 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
Devanagari
Devanagari |deva]]" and "nāgarī" ), also called Nagari , is an abugida alphabet of India and Nepal...

, Hebrew, Latin
Latin
Latin is an Italic language originally spoken in Latium and Ancient Rome. It, along with most European languages, is a descendant of the ancient Proto-Indo-European language. Although it is considered a dead language, a number of scholars and members of the Christian clergy speak it fluently, and...

, and Thai
Thai alphabet
Thai script , is used to write the Thai language and other, minority, languages in Thailand. It has forty-four consonants , fifteen vowel symbols that combine into at least twenty-eight vowel forms, and four tone marks ....

. 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.

Saffron fully supports application-hinted glyphs. This feature allows 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 and can often lead to disastrous results. 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

Saffron 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. Note that during sub-pixel rendering, Saffron reduces color fringing artifacts that would otherwise be visible and distracting at small sizes.

Continuous stroke modulation

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

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK