Biggest patent portfolios by company

by company

  • INTERNATIONAL BUSINESS MACHINES CORPORATION 13,899
  • CANON KABUSHIKI KAISHA 9,693
  • NEC CORPORATION 6,843
  • SAMSUNG ELECTRONICS CO., LTD. 6,726
  • KABUSHIKI KAISHA TOSHIBA 6,682
  • SONY CORPORATION 6,195
  • HITACHI, LTD. 5,935
  • FUJITSU LIMITED 5,841
  • MATSUSHITA ELECTRIC INDUSTRIAL CO., LTD. 5,735
  • MITSUBISHI DENKI KABUSHIKI KAISHA 5,253

Biggest patent portfolios by inventor

by inventor

  • Silverbrook Kia 1,860
  • Yamazaki Shunpei 1,585
  • Satake Toshihiko 905
  • Yamamoto Hiroshi 766
  • WATANABE HIROSHI 753
  • Weder Donald E. 657
  • Forbes Leonard 618
  • Tanaka Hiroshi 585
  • Suzuki Takashi 575
  • Takahashi Hiroshi 570

Patent appraised by patentsbase

$

GLOBAL PATENTRANK

# 56.000
TITLE:

Method for antialiasing a set of objects represented as a set of two-dimensional distance fields in object-order

USA PATENT RANK
Patent ID
Issue Date
#3.566.999
US-6933952-B2
23.08.2005






























ABSTRACT

A method and apparatus antialias a region of a set of objects. The set of objects is represented by a set of two-dimensional distance fields. Each distance field is partitioned into cells, where each cell is associated with a method for reconstructing the distance field within the cell. For each distance field, a set of cells associated with the region is identified. A set of pixels associated with the region is located and a set of components is specified for each pixel. For each component of each pixel, a corresponding distance for the component is determined for each distance field using the corresponding set of cells and the corresponding distances are combined to determine a combined distance. The combined distance is mapped to an antialiased intensity of the component of the pixel.

INFORMATION

Inventor(s) FRISKEN SARAH F (US); PERRY RONALD N (US); FRISKEN SARAH F.; PERRY RONALD N.; Frisken Sarah F.; Perry Ronald N.;
Applicant(s) MITSUBISHI ELECTRIC RES LABS I (US); MITSUBISHI ELECTRIC RESEARCH LABS, INC.;
Assignee MITSUBISHI ELECTRIC RESEARCH LABS, INC. (Cambridge, US);
Assignee history
assigneesMITSUBISHI ELECTRIC RESEARCH LABORATORIES, INC. (201 BROADWAY, CAMBRIDGE, MA, 02139);assignorsFRISKEN, SARAH F.;PERRY, RONALD N.;correspondence-addressMITSUBISHI ELECTRIC RESEARCH ( LABORATORIES, INC., ANDREW J. CURTIN, 201 BROADWAY, CAMBRIDGE, MA 02139);
Agent BrinkmanCurtin
Application No. US-80243104-A
Filing Date 16.03.2004
Primary Class G09G 5/00
Primary Examiner Bella Matthew C.;
Assistent Examiner Brautigam Alysa;

DETAILED DESCRIPTION OF THE INVENTION

RELATED APPLICATION

This application is a Continuation in Part of a U.S. patent application titled “Method for Antialiasing an Object Represented as a Two-Dimensional Distance Field in Object-Order,” Ser. No. 10/396,861, filed on Mar. 25, 2003 by Frisken, et al.

FIELD OF THE INVENTION

The invention relates generally to the field of computer graphics, and more particularly to rendering objects represented by two-dimensional distance fields.

BACKGROUND OF THE INVENTION

In the field of computer graphics, the rendering of two-dimensional objects is of fundamental importance. Two-dimensional objects, such as character shapes, corporate logos, and elements of an illustration contained in a document, are rendered as static images or as a sequence of frames comprising an animation. There are numerous representations for two-dimensional objects and it is often the case that one representation is better than another representation for specific operations such as rendering and editing. In these cases, a conversion from one form to another is performed.

Although we focus here on digital type, possibly the most common and important two-dimensional object, the following discussion applies to all types of two-dimensional objects.

We begin with some basic background on digital type. A typical Latin font family, such as Times New Roman or Arial, includes a set of fonts, e.g., regular, italic, bold and bold italic. Each font includes a set of individual character shapes called glyphs. Each glyph is distinguished by its various design features, such as underlying geometry, stroke thickness, serifs, joinery, placement and number of contours, ratio of thin-to-thick strokes, and size.

There are a number of ways to represent fonts, including bitmaps, outlines, e.g., Type 1 [Adobe Systems, Inc. 1990] and TrueType [Apple Computer, Inc. 1990], and procedural fonts, e.g., Knuth's Metafont, with outlines being predominant. Outline-based representations have been adopted and popularized by Bitstream Inc. of Cambridge, Mass., Adobe Systems, Inc. of Mountain View, Calif., Apple Computer, Inc., of Cupertino, Calif., Microsoft Corporation of Bellevue, Wash., URW of Hamburg, Germany, and Agfa Compugraphic of Wilmington, Mass.

Hersch, “, ” Cambridge University Press. 1993 and Knuth, “TEX and METAFONT: , ” Digital Press, Bedford, Mass. 1979, contain comprehensive reviews of the history and science of fonts.

Of particular importance are two classes of type size: body type size and display type size. Fonts in body type are rendered at relatively small point sizes, e.g., 14 pt. or less, and are used in the body of a document, as in this paragraph. Body type requires high quality rendering for legibility and reading comfort. The size, typeface, and baseline orientation of body type rarely change within a single document.

Fonts in display type are rendered at relatively large point sizes, e.g., 36 pt. or higher, and are used for titles, headlines, and in design and advertising to set a mood or to focus attention. In contrast to body type, the emphasis in display type is on esthetics, where the lack of spatial and temporal aliasing is important, rather than legibility, where contrast may be more important than antialiasing. It is crucial that a framework for representing and rendering type handles both of these classes with conflicting requirements well.

Type can be rendered to an output device, e.g., printer or display, as bi-level, grayscale, or colored. Some rendering engines use bi-level rendering for very small type sizes to achieve better contrast. However, well-hinted grayscale fonts can be just as legible.

Hints are a set of rules or procedures stored with each glyph to specify how an outline of the glyph should be modified during rendering to preserve features such as symmetry, stroke weight, and a uniform appearance across all the glyphs in a typeface.

While there have been attempts to design automated and semi-automated hinting systems, the hinting process remains a major bottleneck in the design of new fonts and in the tuning of existing fonts for low-resolution display devices. In addition, the complexity of interpreting hinting rules precludes the use of hardware for font rendering. The lack of hardware support forces compromises to be made during software rasterization, such as the use of fewer samples per pixel and poor filtering methods, particularly when animating type in real time.

Grayscale font rendering typically involves some form of antialiasing. Antialiasing is a process that smoothes out jagged edges or staircase effects that appear in bi-level fonts. Although many font rendering engines are proprietary, most use supersampling, after grid fitting and hinting, with 4 or 16 samples per pixel followed by down-sampling with a 2×2 or 4×4 box filter, respectively.

Rudimentary filtering, such as box filtering, is justified by the need for rendering speed. However, even that approach is often too slow for real-time rendering, as required for animated type, and the rendered glyphs suffer from spatial and temporal aliasing.

Three important trends in typography reveal some inherent limitations of prior art font representations and associated methods and thus provide the need for change.

The first trend is the increasing emphasis of reading text on-screen due to the dominant role of computers in the office, the rise in popularity of Internet browsing at home, and the proliferation of PDAs and other hand-held electronic devices. These displays typically have a resolution of 72-150 dots per inch, which is significantly lower than the resolution of printing devices.

This low-resolution mandates special treatment when rasterizing type to ensure reading comfort and legibility, as evidenced by the resources that companies such as Microsoft and Bitstream have invested in their respective ClearType and Font Fusion technologies.

The second trend is the use of animated type, or kinetic typography. Animated type is used to convey emotion, to add interest, and to visually attract the reader's attention. The importance of animated type is demonstrated by its wide use in television and Internet advertising.

The third trend is the proliferation of display devices that incorporate numerous layouts for components of pixels of such displays. Vertically and horizontally striped RGB components have been the standard arrangement for conventional displays, as described in U.S. Pat. No. 6,188,385 “Method and apparatus for displaying images such as text”, Hill et al. Arranging the components differently, however, has numerous advantages, as described in U.S. Patent Application publication number 20030085906 “Methods and systems for sub-pixel rendering using adaptive filtering”, Elliott et al.

Unfortunately, traditional outline-based fonts and corresponding methods have limitations in all of these areas. Rendering type on a low-resolution display requires careful treatment in order to balance the needs of good contrast for legibility, and reduced spatial and/or temporal aliasing for reading comfort.

As stated above, outline-based fonts are typically hinted to provide instructions to the rendering engine for optimal appearance. Font hinting is labor intensive and expensive. For example, developing a well-hinted typeface for Japanese or Chinese fonts, which can have more than ten thousand glyphs, can take years. Because the focus of hinting is on improving the rendering quality of body type, the hints tend to be ineffective for type placed along arbitrary paths and for animated type.

Although high quality filtering can be used to antialias grayscale type in static documents that have a limited number of font sizes and typefaces, the use of filtering in animated type is typically limited by real-time rendering requirements.

Prior art sub-pixel rendering methods, like those described in U.S. Pat. No. 6,188,385, have numerous disadvantages pertaining to all three trends.

First, they require many samples per pixel component to get adequate quality, which is inefficient. When rendering on alternative pixel layouts comprising many components, e.g., such as the layouts described in U.S. Patent Application publication number 20030085906, their methods become impractical. Second, they exploit the vertical or horizontal striping of a display to enable reuse of samples for neighboring pixel components, which fails to work with many alternative pixel component layouts. Third, they use a poor filter when sampling each component because of the inefficiencies of their methods when using a better filter.

Fourth, the methods taught do not provide any measure for mitigating color fringing on alternative pixel component layouts. Fifth, translations of a glyph by non-integer pixel intervals require re-rendering of the glyph. Re-rendering usually requires re-interpreting hints, which is inefficient. Sixth, hints are often specific to a particular pixel component layout, and therefore must be redone to handle the proliferation of alternative pixel component layouts. Redoing hints is both expensive and time consuming.

Rendering Overlapping Objects

When two or more objects are rendered, their rendered images may overlap. For example, the antialiased edges of two glyphs in a line of text may overlap when the glyphs are placed close together. As another example, a single Kanji glyph may be represented by a composition of several elements, such as strokes, radicals, or stroke-based radicals, which may overlap when they are combined to render the single Kanji glyph.

In such cases, a rendering method must handle a region where the objects overlap. There are several methods in the prior art for handling such overlap regions. The “Painter's Algorithm” is a common approach used in computer graphics for two-dimensional and three-dimensional rendering. In the Painter's Algorithm, objects are ordered back-to-front and then rendered in that order. Pixels determined by each rendering simply overwrite corresponding pixels in previous renderings.

Other prior art methods blend color or intensity values of overlapping pixels, i.e., those methods combine the color or intensity values according to a rule, such as choosing a maximum or a minimum value or performing an arithmetic average of the overlapping pixels. Some of those methods use alpha values associated with each pixel to blend the values of the overlapping pixels using a technique called alpha blending.

Those prior art methods can be problematic for a number of reasons.

For example, the Painter's Algorithm results in color artifacts between closely spaced glyphs when rendering on liquid crystal displays (LCDs), organic light emitting diodes (OLEDs), or similar display technologies with separately addressable pixel components.

Prior art methods that blend pixel colors or intensities require additional computation and storage for alpha values and exhibit various artifacts such as edge blurring or edge dropout depending on the blending method used.

In addition, coverage values determined for a set of overlapping objects using prior art coverage-based antialiasing cannot, in general, be blended together to represent the actual coverage of the combined object.

Another prior art approach for handling overlapping objects combines the objects to produce a composite object prior to rendering. For example, for an outline-based glyph composed of multiple elements, the outlines of the elements are joined to form a single outline description prior to rendering. Similarly, for rendering a stroke-based glyph composed of multiple strokes, the strokes are combined into a single set of strokes before rendering.

For object elements represented as distance fields, the distance fields can be combined into a single distance field prior to rendering using CSG operations as described by Perry et al., “Kizamu: A System for Sculpting Digital Characters,” 2001, pp. 47-56, 2001. When the composite object is represented as an adaptively sampled distance field, the composite object can require significantly more storage than the total storage required by the elements because the combining may introduce fine detail such as very thin sections or corners into the composite object that are not present in any element.

All of those prior art methods that combine prior to rendering require additional storage space and complex operations to generate the composite object. Furthermore, those methods require two passes, one to build the composite object and one to render the composite object.

Generating and Rendering Component-Based Glyphs

An Asian font, such as a Chinese, Japanese, or Korean font, can include 10,000 or more glyphs. In order to reduce memory requirements, glyphs in such fonts can be represented as compositions of a common set of components, herein referred to as elements, such as strokes or radicals. These common elements are then stored in a memory as a font library and combined either prior to rendering or during rendering to produce a composite glyph.

Prior art methods define the elements using outline descriptors, typically Bezier curves, or stroked skeletons. The elements can be combined prior to rendering into a single shape descriptor, such as a combined outline or a combined set of strokes. Alternatively, each element can be rendered independently, producing, for each pixel, either antialiased intensities or coverage values from the elements that are combined to produce a final antialiased intensity or coverage value for the pixel. Both approaches have problems as described above.

SUMMARY OF THE INVENTION

The invention provides a method and apparatus to antialias a region of a set of objects. The set of objects is represented by a set of two-dimensional distance fields. Each distance field is partitioned into cells, where each cell is associated with a method for reconstructing the distance field within the cell. For each distance field, a set of cells associated with the region is identified. A set of pixels associated with the region is located and a set of components is specified for each pixel. For each component of each pixel, a corresponding distance for the component is determined for each distance field using the corresponding set of cells and the corresponding distances are combined to determine a combined distance. The combined distance is mapped to an antialiased intensity of the component of the pixel.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

Distance Field Representation of Glyphs

Our invention represents a closed two-dimensional shape S, such as a glyph, a corporate logo, or any digitized representation of an object, as a two-dimensional signed distance field D. For the purpose of our description, we use glyphs.

Informally, the distance field of a glyph measures a distance, e.g., a minimum distance, from any point in the field to the edge of the glyph, where the sign of the distance is negative if the point is outside the glyph and positive if the point is inside the glyph. Points on the edge have a zero distance.

Formally, the distance field is a mapping D:→ for all p ∈ such that D(p)=sign(p)·min{∥p−q∥: for all points q on the zero-valued iso-surface, i.e., edge, of S}, sign(p)={−1 if p is outside S, +1 if p is inside S}, and ∥·∥ is the Euclidean norm.

Prior art coverage-based rendering methods that use a single discrete sample for each pixel or for each pixel component can completely miss the glyph even when the sample is arbitrarily close to the outline. The rendered glyph has jagged edges and dropout, which are both forms of spatial aliasing. If the glyph is animated, then temporal aliasing causes flickering outlines and jagged edges that seem to ‘crawl’ during motion. Taking additional samples per pixel or per pixel component to produce an antialiased rendition can reduce these aliasing effects, but many samples may be required for acceptable results.

In contrast, continuously sampled distance values according to our invention indicate a proximity of the glyph, even when the samples are outside the shape, thereby eliminating the dropout artifacts of the prior art. The continuous nature of the sampled distance values can be used, according to our invention, to mitigate spatial aliasing artifacts.

Furthermore, because the distance field varies smoothly, i.e., it is Ccontinuous, sampled values change slowly as the glyph moves, reducing temporal aliasing artifacts.

Distance fields have other advantages. Because they are an implicit representation, they share the benefits of implicit functions. In particular, distance fields enable an intuitive interface for designing fonts. For example, individual components of glyphs such as stems, bars, rounds, and serifs can be designed separately. After design, the components can be blended together using implicit blending methods to compose different glyphs of the same typeface.

Distance fields also have much to offer in the area of kinetic typography or animated type because distance fields provide information important for simulating interactions between objects.

In a preferred embodiment, we use adaptively sample distance fields, i.e., ADFs, see U.S. Pat. No. 6,396,492, “Detail-directed hierarchical distance fields,” Frisken, Perry, and Jones, incorporated herein by reference.

ADFs are efficient digital representations of distance fields. ADFs use detail-directed sampling to reduce the number of samples required to represent the field. The samples are stored in a spatial hierarchy of cells, e.g., a quadtree, for efficient processing. In addition, ADFs provide a method for reconstructing the distance field from the sampled values.

Detail-directed or adaptive sampling samples the distance field according to a local variance in the field: more samples are used when the local variance is high, and fewer samples are used when the local variance is low. Adaptive sampling significantly reduces memory requirements over both regularly sampled distance fields, which sample at a uniform rate throughout the field, and 3-color quadtrees, which always sample at a maximum rate near edges.

compare the number of cells required for a 3-color quadtree for a Times Roman ‘a’ and ‘D’ with the number of cells required for a bi-quadratic ADF in of the same accuracy. The number of cells is directly related to storage requirements. Both quadtrees have a resolution equivalent to a 512×512 image of distance values. The 3-color quadtrees for the ‘a’ and the ‘D’ have 17,393 and 20,813 cells respectively, while their corresponding bi-quadratic ADFs have 457 and 399 cells. Bi-quadratic ADFs typically require 5-20 times fewer cells than the prior art bi-linear representation of Frisken et al., “Adaptively Sampled Distance Fields: a General Representation of Shape for Computer Graphics,” 2000, pp.249-254, 2000.

Bi-Quadratic Reconstruction Method

Frisken et al. use a quadtree for the ADF spatial hierarchy, and reconstruct distances and gradients inside each cell from the distances sampled at the four corners of each cell via bi-linear interpolation. They suggest that “higher order reconstruction methods . . . might be employed to further increase compression, but the numbers already suggest a point of diminishing return for the extra effort”.

However, bi-linear ADFs are inadequate for representing, rendering, editing, and animating character glyphs according to the invention. In particular, they require too much memory, are too inefficient to process, and the quality of the reconstructed field in non-edge cells is insufficient for operations such as dynamic simulation.

A “bounded-surface” method can force further subdivision in non-edge cells by requiring that non-edge cells within a bounded distance from the surface, i.e., an edge, pass an error predicate test, see Perry et al., “Kizamu: A System for Sculpting Digital Characters,” 2001, pp.47-56, 2001. Although the bounded-surface method reduces the error in the distance field within this bounded region, we have found that for bi-linear ADFs that method results in an unacceptable increase in the number of cells.

To address those limitations, we replace the bi-linear reconstruction method with a bi-quadratic reconstruction method. Bi-quadratic ADFs of typical glyphs tend to require 5-20 times fewer cells than bi-linear ADFs. Higher reduction in the required number of cells occurs when we require an accurate distance field in non-edge cells for operations such as dynamic simulation and animated type.

This significant memory reduction allows the glyphs required for a typical animation to fit in an on-chip cache of modern CPUs. This has a dramatic effect on processing times because system memory access is essentially eliminated, easily compensating for the additional computation required by the higher order reconstruction method.

illustrates a bi-quadratic ADF cell according to our preferred embodiment. Each cell in the bi-quadratic ADF contains nine distance values . A distance and a gradient at a point (x, y) are reconstructed from these nine distance values according to Equations 1-3 below.

There are a variety of bi-quadratic reconstruction methods available. We use a bivariate interpolating polynomial which guarantees Ccontinuity along shared edges of neighboring cells of identical size. As with the bi-linear method, continuity of the distance field between neighboring cells of different size is maintained to a specified tolerance using an error predicate. The error predicate controls cell subdivision during ADF generation, see Perry et al., above.

The distance and gradient at the point (x, y) , where x and y are expressed in cell coordinates, i.e., (x, y)∈[0,1]×[0,1], are determined as follows: Let −0.5 and −1 Let −0.5 and −1 Let =2=−4, and =2 Let =2=−4, and =2

Reconstructing a distance using floating point arithmetic can require ˜35 floating-point operations (flops), and reconstructing a gradient using floating point arithmetic can require ˜70 flops. Because our reconstruction methods do not contain branches and the glyphs can reside entirely in an on-chip cache, we can further optimize these reconstruction methods by taking advantage of special CPU instructions and the deep instruction pipelines of modem CPUs. Further, we can reconstruct a distance and a gradient using fixed-point arithmetic.

Compression for Transmission and Storage

Linear Quadtrees

The spatial hierarchy of the ADF quadtree is required for some processing, e.g., collision detection, but is unnecessary for others, e.g., cell-based rendering as described below.

To provide compression for transmission and storage of ADF glyphs, we use a linear quadtree structure, which stores our bi-quadratic ADF as a list of leaf cells. The tree structure can be regenerated from the leaf cells as needed.

Each leaf cell in the linear ADF quadtree includes the cell's x and y positions in two bytes each, the cell level in one byte, the distance value at the cell center in two bytes, and the eight distance offsets from the center distance value in one byte each, for a total of 15 bytes per cell.

Each distance offset is determined by subtracting its corresponding sample distance value from the center distance value, scaling by the cell size to reduce quantization error, and truncating to eight bits. The two bytes per cell position and the one byte for cell level can represent ADFs up to 2×2in resolution. This is more than adequate for representing glyphs to be rendered at display screen resolutions.

Glyphs can be accurately represented by 16-bit distance values. Encoding eight of the distance values as 8-bit distance offsets provides substantial savings over storing each of these values in two bytes. Although, in theory, this may lead to some error in the distance field of large cells, we have not observed any visual degradation.

A high-resolution glyph typically requires 500-1000 leaf cells. Lossless entropy encoding can attain a further 35-50% compression. Consequently, an entire typeface of high-resolution ADFs can be represented in 300-500 Kbytes. If only body type is required or the target resolution is very coarse, as for cell phones, then lower resolution ADFs can be used that require ¼ to ½ as many cells.

These sizes are significantly smaller than grayscale bitmap fonts, which require ˜0.5 Mbytes per typeface for each point size, and are comparable in size to well-hinted outline-based fonts. Sizes for TrueType fonts range from 10's of Kbytes to 10's of Mbytes depending on the number of glyphs and the amount and method of hinting. Arial and Times New Roman, two well-hinted fonts from the Monotype Corporation, require 266 Kbytes and 316 Kbytes respectively.

Run-time Generation from Outlines

According to our invention, and as described in detail below, ADFs can be generated quickly from existing outline or boundary descriptors, e.g., Bezier curves, using the tiled generator described by Perry et al. The minimum distance to a glyph's outline or boundary is computed efficiently using Bezier clipping, see Sederberg et al., “Geometric Hermite Approximation of Surface Patch Intersection Curves,” , 8(2), pp. 97-114, 1991.

Generation requires 0.04-0.08 seconds per glyph on a 2 GHz Pentium IV processor. An entire typeface can be generated in about four seconds. Because conventional hints are not needed, the boundary descriptors required to generate the ADFs are substantially smaller than their corresponding hinted counterparts.

Therefore, rather than storing ADFs, we can store these minimal outlines and generate ADF glyphs dynamically from these outlines on demand. The reduced size of these minimal outlines is important for devices with limited memory and for applications that transmit glyphs across a bandwidth-limited network.

shows a method for converting a two-dimensional object, such as a glyph, to a two-dimensional distance field. The object is represented as a set of boundary descriptors, e.g., splines, and a fill rule, e.g., an even-odd rule or a non-zero winding rule.

The set of boundary descriptors are first preprocessed . The preprocessing subdivides the boundary descriptors to reduce their spatial extent. The boundary descriptors can also be coalesced to reduce the cardinality of the set of boundary descriptors. The preprocessing allows us to reduce the number of boundary descriptors that need to be queried for each location when determining the unsigned distance, as described below.

A spatial hierarchy , e.g., a quadtree, is constructed from the preprocessed set of boundary descriptors . A cache of intersections is initialized . The cache of intersections stores locations where the boundary descriptors intersect a set of lines, e.g., horizontal, vertical, diagonal, etc., of the distance field, and the direction of the intersection. This eliminates redundant computations when determining the sign of the unsigned distances. The intersections can be sorted by intervals.

The spatial hierarchy is then queried at a set of locations to determine a set of distances at those locations. The set of distances is used to construct a two-dimensional distance field . The querying invokes a distance function, e.g., Bezier clipping, at each location to determine an unsigned distance. The cache of intersections, the location, and the fill rule are used to determine a sign for the distance.

Compression Via Component-Based Fonts

Significant compression for Chinese, Japanese, and Korean fonts, which can consist of 10,000 or more glyphs, can be achieved by using a component-based representation as in Font Fusion. That representation decomposes glyphs into common strokes and radicals, i.e., complex shapes common to multiple glyphs, stores the strokes and radicals in a font library, and then recombines them in the font rendering engine.

Because distance fields are an implicit representation, ADFs can be easily combined using blending or CSG operations, and thus are well suited for compression via that component-based approach.

Representing Corners in a Two Dimensional Distance Field

Detail-directed sampling with a bi-linear or bi-quadratic reconstruction method allows ADFs to represent relatively smooth sections of a boundary of a two-dimensional object with a small number of distance values. However, near corners, the distance field has a high variance that is not well approximated by these reconstruction methods. In order to represent the distance field near corners accurately, such ADFs require cells containing corners to be highly subdivided, significantly increasing memory requirements. In addition, a maximum subdivision level of the ADF, imposed during ADF generation as described in Perry et al., limits the accuracy with which corners can be represented using bi-linear and bi-quadratic ADF cells.

To address this problem, our invention provides a method as shown in for generating a two-dimensional distance field within a cell associate with a corner of a two-dimensional object, such as a glyph.

The method determines an ordered set of boundary descriptors from the two-dimensional object and identifies a corner point associated with, e.g., near or within, a cell from the ordered set of boundary descriptors . The cell is then partitioned into two regions, a first region nearest the corner and a second region nearest the boundary of the object. The method also specifies a reconstruction method and a set of sampled distance values for reconstructing distances within the cell and stores the corner point , lines delimiting the regions, the reconstruction method, and the set of sampled distance values in a memory.

The reconstruction method determines a distance at a point within the cell according to which region the point lies in. A distance for a query point in the first region is determined as the distance from the query point to the corner point.

For determining distances in the second region, we partition the ordered set of boundary descriptors into two subsets, one comprising boundary descriptors before the corner point and one comprising boundary descriptors after the corner point . Each subset of boundary descriptors is then extended to form an extended curve that partitions the cell into an interior and exterior section. For each section, the distance field within the cell can be reconstructed from the set of sample distance values that are determined from the corresponding extended curve. A bi-quadratic reconstruction method would require that nine distance values be stored for each of the two extended curves.

Note that the intersection of the two interior sections forms the corner of the object. Hence, distances within the second region can be determined by reconstructing a distance to the first interior section and a distance to the second interior section and then selecting the minimum of the two determined distances.

The two regions can be specified from two directed lines passing through the corner point, each line perpendicular to one of the two subsets of boundary descriptors. Each line can be specified by the corner point and the outward facing normal of the corresponding subset of boundary descriptors at the corner point. When a line is thus defined, we can determine which side of the line a query point lies on by determining a cross product of a vector from the query point to the corner point and the outward facing normal. Points lying on the exterior side of both lines lie in the first region while points lying on the interior side of either line lie in the second region.

illustrate a representation of a corner cell. In , a cell contains a portion of an object , where an inside of the object is shaded and an outside is left white. A boundary of the object within the cell includes a first set of boundary descriptors , a corner point , and a second set of boundary descriptors .

A distance field in the cell of the portion of the object can be represented by combining a distance field of an extended curve , illustrated in , a distance field of an extended curve , illustrated in , and a distance field of the corner point , illustrated in FIG. D. The extended curve is defined by extending the first set of boundary descriptors . Similarly, the extended curve is defined by extending the second set of boundary descriptors .

In a preferred embodiment, the distance fields of the extended curves and are each represented using a set of sampled distances and a reconstruction method such as a bi-linear or bi-quadratic reconstruction method, while the distance field of the corner point is represented by a procedure for determining a signed distance from a sample point to the corner point .

A sign of the distance field of the corner point can be determined from an angle of the corner represented by the corner point . If the angle of the corner measured on the outside of the portion of the object is acute, then the sign of the distance field of the corner point is positive. If the angle of the corner measured on the outside of the portion of the object is obtuse, then the sign of the distance field of the corner point is negative. For example, the corner represented by the corner point is obtuse and the sign of the distance field of the corner is negative.

The distance fields of the extended curves and and the corner point each have a valid area and an invalid area. The valid areas and the invalid areas are separated by a first line defined by a normal vector to the extended curve and a second line defined by a normal vector to the extended curve , both lines passing through the corner point .

, C, and D show shaded invalid areas , , and and unshaded valid areas , , and for the extended curves and and the corner point , respectively. The first and second regions, defined above for the method , can be determined from the valid areas. The first region, i.e., the region of the cell nearest the corner point , is the same as the valid area of the corner point . The second region, i.e., the region of the cell nearest the boundary of the object , is a union of the valid area of the extended curve and the valid area of the extended curve .

In one embodiment of the invention, to determine a distance at a sample point in the cell , we reconstruct a first signed distance and a first corresponding validity flag from the distance field of the extended curve , a second signed distance and a second corresponding validity flag from the distance field of the extended curve , and a third signed distance and a third corresponding validity flag from the distance field of the corner point . The first, second, and third validity flags are determined according to whether the sample point lies inside or outside the valid areas of the extended curve , the extended curve , and the corner point , respectively. The distance from the sample point to the portion of the object is a minimum of the valid first, second, and third signed distances for the sample point.

Representing Stems and other Thin Structures in a Two Dimensional Distance Field

Using corner cells enables the ADF to represent corners accurately without excessive subdivision of cells. However, in addition to corners, two-dimensional objects such as glyphs can have thin structures such as vertical stems or horizontal bars. Near such structures, the distance field can be Cdiscontinuous. The distance field is Cdiscontinuous at a point when a gradient at the point is singular, i.e., not continuous.

For example, the distance field is Cdiscontinuous along a curve midway between boundary descriptors on either side of a thin structure. Because this discontinuity can require excessive subdivision of the cells of the ADF, there is a need for a better cell representation and reconstruction method near thin structures.

Our present invention provides a ‘two-segment cell’ representation and a two-segment cell reconstruction method for cells near thin structures. , B, and C illustrate a two-segment cell according to our present invention.

In , a cell contains a portion of an object , where the inside of the object is shaded and the outside is left white. The boundary of the portion of the object in the cell includes a first set of boundary descriptors including a first segment and a second set of boundary descriptors including a second segment .

A distance field of the portion of the object within the cell can be represented by combining a distance field of the first segment , illustrated in , and a distance field of the second segment , illustrated in FIG. C. In a preferred embodiment, the distance fields of the first segment and the second segment are each represented using a set of sampled distances and a reconstruction method, such as a bi-linear or a bi-quadratic reconstruction method.

To determine a distance from a sample point to the portion of the object in the cell , we reconstruct, at the sample point, a first signed distance from the distance field of the first segment and a second signed distance from the distance field of the second segment .

In , a positive area of the signed distance field for the first segment is shaded, and a negative area is left white. In , a positive area of the signed distance field for the second segment is shaded, and a negative area is left white. The portion of the object in the cell is an intersection of the shaded positive area of FIG. B and the shaded positive area of FIG. C. In the preferred embodiment, a distance from the sample point to the portion of the object in the cell is a minimum of the first signed distance and the second signed distance.

illustrates a method for generating a two-dimensional distance field within a two-segment cell associated with a two-dimensional object . A set of boundary descriptors is determined for the object . The boundary descriptors can have various representations, including line segments and spline curves, e.g., Bezier curves.

The boundary descriptors are partitioned into a set of segments , where segments in the set of segments are delimited by a set of features that can be determined in a preprocessing step or during the partitioning . Examples of features include corners of the object , points where the boundary descriptors have a substantial degree of curvature, an endpoint of a particular boundary descriptor, or a point on a particular boundary descriptor where an accumulated curvature along a particular segment exceeds a predetermined threshold. Placing a feature at a point of substantial accumulated curvature enables, for example, delimiting a segment if the segment begins to curve back on itself, e.g., if a magnitude of the accumulated curvature of the segment exceeds ninety degrees.

We identify a first segment and a second segment in the set of segments for the cell . In a preferred embodiment, the identifying locates a nearest segment from the set of segments for each test point in a set of test points within the cell by determining a distance from each test point to each segment in the set of segments . If every test point in the cell is nearest to one of two particular segments in the set of segments , then we identify the two particular segments as the first segment and the second segment for the two-segment cell.

We specify a first set of distance values to represent a distance field of the first segment , and a second set of distance values to represent a distance field of the second segment . For example, a set of nine distance values can be specified together with a bi-quadratic reconstruction method to represent a distance field corresponding to one of the segments.

The method defines a reconstruction method for combining the first set of distance values and the second set of distance values to reconstruct the distance field within the cell . In a preferred embodiment, the reconstruction method reconstructs the distance field at a sample point in the cell by determining a first distance from the sample point to the first segment using the first set of distance values , determining a second distance from the sample point to the second segment using the second set of distance values , and combining the first distance and the second distance by taking a minimum of the first distance and the second distance.

The set of distance values , the set of distance values , and the reconstruction method are stored in a memory to enable reconstruction of the two-dimensional distance field of the two-dimensional object within the cell .

Determining an Optimal Configuration of Cells for Distance Fields with Specialized Cells

Using specialized cells such as corner cells and two-segment cells can mitigate excessive subdivision of cells of an ADF representing an object, such as a glyph, with corners and thin structures. However, determining an optimal configuration of cells for a distance field that uses such specialized cells can be significantly more complicated than determining an optimal configuration of cells without specialized cells. A configuration of cells for a distance field includes, for example, locations, sizes, orientations, reconstruction methods, types, and geometries for the cells.

There are many possible cell configurations for partitioning a region containing a distance field representing an object. The prior art of Frisken et al. teaches a top-down and a bottom-up subdivision method that partitions the region into rectangular cells to generate a quadtree-based or octree-based ADF, thereby providing a non-optimal configuration without specialized cells. Unlike the prior art, the present invention provides a method for generating a cell-based distance field representation with an optimal configuration of cells. In the preferred embodiment, the optimal configuration can include specialized cells such as corner cells and two-segment cells.

illustrates a region containing a portion of a two-dimensional object , where an inside of the object is shaded and an outside is left white. A boundary of the portion of the object within the region includes a first segment associated with a first set of boundary descriptors, a second segment associated with a second set of boundary descriptors, and a third segment associated with a third set of boundary descriptors. The first segment and the second segment meet at a corner of the portion of the object , while the second segment and the third segment meet at a corner of the portion of the object .

There are many ways to partition the region to determine a configuration of cells. show various configurations of cells that partition the region when the configurations can include two-segment cells and corner cells. A particular definition of ‘optimal’ for an optimal configuration depends on many factors, some of which are illustrated in , and others of which are discussed below.

shows a Voronoi diagram for the boundary of the object within the region . Each differently shaded cell shows a portion of the region nearest to a particular segment or corner. Points in a cell are nearest to the segment . Points in a cell are nearest to the segment . Points in a cell are nearest to the segment . Points in a cell are nearest to the corner . Finally, points in a cell are nearest to the corner .

The Voronoi diagram of is an example of an optimal configuration of cells for the region when the configuration uses only ‘one-segment cells’, a one-segment cell defined to be a cell for which the distance field within the cell can be determined from a single segment. Distances in a one-segment cell can be reconstructed from a set of sampled distance values using, for example, a bi-quadratic reconstruction method when the segment nearest to the cell has a substantially low curvature. Various alternative reconstruction methods are also possible, including an analytic determination of the distance from points in the cell to the segment nearest to the cell.

The Voronoi diagram of is an optimal configuration of cells in the sense that it provides a minimal number of cells from which the distance field of the portion of the object can be reconstructed accurately everywhere in the region using one-segment cells. A disadvantage of using the Voronoi diagram to partition the region is that determining an exact configuration of the Voronoi diagram is difficult. A second disadvantage of using the Voronoi diagram is that cells can have very complex boundaries, thereby resulting in substantially long computation times for rasterizing and locating cells during rendering.

provides an alternative optimal configuration of cells partitioning the region which uses corner cells, as defined above. The region is partitioned into a first corner cell and a second corner cell . Distances within the corner cell can be reconstructed using the first segment , the corner , and the second segment . Distances within the corner cell can be reconstructed using the second segment , the corner , and the third segment . Distances within the corner cell or the corner cell can be reconstructed to substantially high accuracy from sampled distance values using a corner cell reconstruction method such as the one described above.

An advantage of the configuration of cells illustrated in over the configurations of is that the configuration in requires fewer cells. A disadvantage is that corner cell reconstruction methods are usually more complex and inefficient than one-segment and two-segment reconstruction methods and the configuration of cells of requires that a corner cell reconstruction method be used for all points in the region . A second disadvantage with the configuration of is that, like the Voronoi diagram of , cell boundaries may be difficult to determine. A third disadvantage is that cell boundaries may be very complex, thereby resulting in substantially long computation times for rasterizing and locating cells during rendering.

illustrates a third alternative optimal partitioning of the region . The region is partitioned into a quadtree, where each leaf cell in the quadtree is shaded according to its cell type. A cell is a one-segment cell, with points within the cell nearest to the segment . A cell is a two-segment cell, with points within the cell nearest to either the segment or the segment . Distances within the cell can be reconstructed using a two-segment reconstruction method. A cell is a corner cell, where points within the cell are nearest to either the corner , the segment , or the segment . A cell is also a corner cell, where points within the cell are nearest to either the corner , the segment , or the segment . Distances within the cell and the cell can be reconstructed using a corner cell reconstruction method.

Cells , , and are exterior cells, i.e., cells outside of the portion of the object that lie beyond a minimum distance from the boundary of the object . If an accurate representation of the distance field is not needed beyond the minimum distance, then distances at points in cells , , and can be approximated by simpler reconstruction methods. For example, the distances at the points can be reconstructed from nine sampled distance values using a bi-quadratic reconstruction method, thereby decreasing memory and computation time.

An advantage of the partitioning illustrated in is that the cells have simple boundaries and hence are quickly and easily rasterized and located during rendering. A second advantage is that the quadtree provides a spatial data structure that enables fast queries of the distance field. An advantage over the configuration of is that simple reconstruction methods, e.g., one-segment or bi-quadratic reconstruction methods, are used for some points in the region and more complex methods, e.g., two-segment and corner reconstruction methods, are only used when necessary, thereby decreasing computation time. A disadvantage is that there are more cells in the configuration of than in the configurations of .

As illustrated by the examples shown in , C, and D, when specialized cell types are used, there are many optimal configurations of cells for partitioning a distance field representing an object. When generating a configuration, defining ‘optimal’ depends on many factors, including how the configuration is rendered, edited, and processed.

By optimal configuration, we mean a configuration that balances a set of desired characteristics of a cell-based distance field representation. An optimization of the configuration can be guided by minimizing a size of the distance field, minimizing a time required to render the distance field, minimizing a time to generate the distance field, maximizing a quality metric of a rendering of the distance field, minimizing a cell count, and maximizing an accuracy of the distance field, to name but a few.

illustrates a method for generating a cell-based distance field for a region of a shape descriptor representing an object. A set of cell types is defined , where the cell types can include bi-linear and bi-quadratic cell types as well as various specialized cell types including corner cell types and two-segment cell types to name but a few.

The method generates a configuration of a set of cells for the region , where each cell in the set of cells has a particular cell type, as defined by the set of cell types , and a reconstruction method for reconstructing the distance field within the cell. The configuration of the set of cells is modified using the shape descriptor , the region , and the set of cell types until an optimal configuration for the set of cells of the region is reached. The optimal configuration of the set of cells is stored in a memory to generate the cell-based distance field.

Unlike the prior art top-down and bottom-up generation methods described by Frisken et al., the configuration according to the present invention can provide either a complete tessellation or an incomplete tessellation of the region . For example, according to the present invention, both the configuration and the optimal configuration can cover a subset of the region, leaving areas of the region where the distance field is not represented, or a superset of the region, providing a representation of the distance field outside of the region. Unlike the prior art methods, cells in the present invention can overlap each other, providing additional opportunities to generate an optimal configuration.

The prior art methods are not guided by optimization criteria and therefore do not produce optimal configurations in any sense. The prior art applies strictly deterministic methods, resulting in configurations that are often restricted and sub-optimal. The prior art also does not consider specialized cells during generation.

To achieve an optimal configuration according to the present invention, both the generating and the modifying of the configuration of the set of cells can be done manually by a user, automatically by a computer, or semi-automatically, i.e., by computer with input from the user. The modifying can change the configuration of the set of cells by adding or deleting cells from the configuration of the set of cells or by changing attributes of a particular cell such as the geometry, the location, the orientation, and the type of the particular cell. Both the generating and the modifying can be performed using deterministic methods or non-deterministic methods including probabilistic methods and randomized methods.

In one embodiment, the generating places a single cell at an arbitrary or predetermined location in the region and the modifying adjusts the cell to an optimal shape and size. The modifying then adds new cells in uncovered areas of the region , adjusting each of these to optimal shapes and sizes, and repeats this process until an optimal configuration is achieved. In another embodiment, the generating places an initial set of corner cells near corner points of the shape descriptor and the modifying tessellates the remaining uncovered area of the region to determine another optimal configuration . Both of these embodiments provide an optimal configuration that is not possible with the prior art methods of Frisken et al.

In another embodiment, the generating can include preprocessing the shape descriptor to produce a set of preprocessed shape descriptors and a corresponding set of preprocessed distance procedures that can be used to accelerate both the generating and the modifying .

For example, the preprocessing can determine boundary descriptors from the shape descriptor, partition the boundary descriptors into a set of segments delimited by features of the boundary descriptors. The features can include corner points, points along the boundary descriptors with substantial curvature, endpoints of the boundary descriptors, and points of substantial accumulated curvature as described above. The features can be changed during the modifying by adding, deleting, and altering a particular feature. When the features are changed during the modifying , the set of preprocessed shape descriptors and the set of preprocessed distance procedures can be adapted accordingly.

Font Rendering

In today's font rendering engines, fonts are predominantly represented as outlines, which are scaled as needed to match the desired output size. While most high-resolution printers use bi-level rendering, modem display devices more commonly use grayscale rendering or a combination of grayscale and bi-level rendering at small point sizes.

A common approach for rasterizing grayscale glyphs involves scaling and hinting their outlines. The scaled and hinted outlines are scan converted to a high-resolution image, typically four or sixteen times larger than the desired resolution. Then, the high-resolution image is down-sampled by applying a filtering method, e.g., a box filter, to produce the final grayscale image.

For body type, individual glyphs can be rasterized once and stored in a cache as a grayscale bitmap for reuse in a preprocessing step. The need for sub-pixel placement of a glyph may require several versions of each glyph to be rasterized. Use of a cache for body type permits higher quality rendering with short delays, e.g., ½ second, during tasks such as paging through an Adobe Acrobat PDF document.

However, type rendered on arbitrary paths and animated type precludes the use of a cache and therefore must be generated on demand. Real-time rendering requirements can force the use of a poor filter, e.g., box filtering with four samples per pixel, and can preclude the use of hinting. This can cause spatial and temporal aliasing as well as baseline jitter and inconsistent stroke weights. The aliasing can be reduced using hinted device fonts residing in system memory. However, maintaining real-time frame rates places severe constraints on how hinted device fonts can be used, e.g., hinted device fonts cannot be scaled or rotated dynamically.

Recent work at Microsoft on ClearType has led to special treatment for LCD color displays that contain a repeating pattern of addressable colored sub-pixels, i.e., components. Platt, in “Optimal Filtering for Patterned Displays,” , 7(7), pp. 179-180, 2000, describes a set of perceptually optimal filters for each color component. In practice, the optimal filters are implemented as a set of three displaced box filters, one for each color.

ClearType uses prior art hinting and coverage based antialiasing methods to determine the intensity of each component of each pixel and thus has all of the disadvantages described above. In contrast, our distance field based method uses the distance field to determine the intensity of each component of each pixel, and does so using fewer samples. Our ADF antialiasing method described below can replace the box filters to provide better emulation of the optimal filters with fewer samples per pixel.

Antialiasing

Understanding appearance artifacts in rendered fonts requires an understanding of aliasing. Typically, a pixel is composed of discrete components, e.g., a red, green, and blue component in a color printer or display. In a grayscale device, the pixel is a single discrete component. Because pixels are discrete, rendering to an output device is inherently a sampling process. The sampling rate is dependent on the resolution of the device. Unless the sampling rate is at least twice the highest (Nyquist) frequency in the source signal, the sampled signal exhibits aliasing.

Edges, e.g., glyph outlines, have infinite frequency components. Hence, edges cannot be represented exactly by sampled data. Inadequate sampling of edges results in jaggies, which tend to crawl along the sampled edges in moving images. If the source signal also contains a spatial pattern, e.g., the repeated vertical stems of an ‘m’ or the single vertical stem of an ‘i’, whose frequency components are too high for the sampling rate, then the sampled data can exhibit dropout, moire patterns, and temporal flicker.

To avoid aliasing, the input signal must be pre-filtered to remove frequency components above those permitted by the sampling rate. In general, there are two approaches to pre-filtering.

The first is known as analytic filtering. It applies some form of spatial averaging to a continuous representation of the source signal before sampling. Unfortunately, analytic filtering is often not possible, either because the source data are not provided as a continuous signal, which is the normal case for image processing, or because determining an analytic description of the signal within the filter footprint is too complex. This is the case for all but simple geometric shapes in computer graphics and certainly the case for spline-based outlines.

The second approach is known as discrete filtering. In that approach, the source signal is typically sampled at a higher rate than the target rate to obtain a supersampled image. Then, a discrete filter is applied to reduce high frequencies in the supersampled image before down-sampling the image to the target rate. The discrete approach is referred to as regular supersampling in computer graphics.

Various discrete filters can be applied depending on the processing budget, hardware considerations, and personal preferences for contrast versus smoothness in the output image. The box filter typically used to render type simply replaces a rectangular array of supersampled values with their arithmetic average and is generally regarded as inferior in the signal processing community.

In another approach, adaptive supersampling focuses available resources for sampling and filtering on areas of the image with higher local frequency components. Optimal adaptive sampling can be determined from the local variability in the image. However, the usefulness of this technique is limited by the need to estimate the local variance of the image, a process that can be computationally expensive.

Moiré patterns, due to inadequate regular sampling of high frequency patterns, are particularly objectionable to the human visual system. In general image processing, stochastic or jittered sampling has been used to solve this problem. With stochastic sampling, the samples are randomly displaced slightly from their nominal positions. Stochastic sampling tends to replace moiré pattern aliasing with high frequency noise and has been shown to be particularly effective in reducing temporal aliasing.

Rendering with Distance-Based Antialiasing

The infinite frequency components introduced by edges of a glyph are a major contribution to aliasing in prior art font rendering. In contrast, by using 2D distance fields to represent 2D objects and then sampling the 2D distance fields according to the invention, we avoid such edges because the representation is Ccontinuous. Instead, a maximum frequency depends on a spatial pattern of the glyph itself, e.g., the repeated vertical stems of an ‘m’ or the single vertical stem of an ‘i’.

By representing the glyph by its 2D distance field, we are effectively applying an analytic pre-filter to the glyph. Our antialiasing methods for rendering distance fields as described below yield an output that is different from the output of a conventional analytic pre-filter.

Antialiasing with Distance Fields

shows a method for antialiasing, in image-order, an object , e.g., a glyph, represented as a two-dimensional distance field . Each pixel can include one or more components , typically a red, blue, and green component for a ‘RGB’ type of output device. This method can use one or more samples for each component of each pixel . The method provides adaptive distance-based super sampling, distance-based automatic hinting, and distance-based grid fitting. The resulting antialiased pixel intensity can be rendered on CRT and LCD-like displays as part of an image. The method is particularly useful for rendering motion blur.

A set of sample points in the two-dimensional distance field representing the object is associated with each component of each pixel . A distance (D) is determined from the two-dimensional distance field and the set of sample points . Then, the distance is mapped to an antialiased intensity (I) of the component of the pixel .

In the preferred embodiment, the glyph is represented by a bi-quadratic ADF , as described above. This makes it efficient to apply distance-based antialiasing during font rendering. Other representations such as a two-dimensional distance map, a two-dimensional distance shell, an optimal ADF including specialized cells, and a procedural distance field can also be used.

For each component of each pixel in an image, a cell, e.g., a leaf cell, containing the component is located using a quadtree traversal method described in U.S. patent application Ser. No. 10/209,302, filed on Jul. 31, 2002 and titled “Method for Traversing Quadtrees, Octrees, and N-Dimensional Bi-trees,” incorporated herein by reference in its entirety. Although other traversal methods known in the art can be used with our invention, the aforementioned method is comparison-free and therefore executes efficiently. The distance at the component is reconstructed from the cell's distance values and mapped to the antialiased intensity (I) .

Different mappings can be used, including linear, Gaussian, and sigmoidal functions. Selection of the best mapping function is subjective. In one embodiment, our mapping is a composition of two functions. The first function is as described above, the second is a contrast enhancement function. These two functions are composed to map the distance field (D) to the antialiased intensity (I) of the component .

shows a linear mapping of intensity , e.g., [0,1], as a function of distance . The mapping converts a distance to an antialiased image intensity for each component of the pixel. Distances are positive inside the object and negative outside the object. Different cutoff values and affect the edge contrast and stroke weight. We achieve good results with outside and inside filter cutoff values of (−0.75, 0.75) pixels for display type, and (−0.5, 0.625) pixels for body type.

The mapping can be chosen with a user interface that allows a display manufacturer to tune the mapping for their displays. Similarly, the user interface can be provided at an application or operating system level to enable each user the ability to optimize the mapping to their personal preferences.

Optimal Distance-Based Adaptive Supersampling

The above described distance-based antialiasing method reduces aliasing due to glyph edges. However, aliasing artifacts still occur when stem widths or spacing between glyph components are too small for the display's sampling rate. In such cases, we apply distance-based adaptive supersampling as described below to further reduce spatial and temporal aliasing.

In the preferred embodiment, we use bi-quadratic ADFs with our novel distance-based adaptive supersampling to provide significant advantages over prior art outline-based representations and coverage-based adaptive supersampling methods. Because ADFs use detail-directed sampling, regions of the distance field with higher local variance are represented by smaller leaf cells. Hence, the structure of the ADF quadtree provides the map of local variance required to implement optimal distance-based adaptive sampling, overcoming the difficulty in the prior art adaptive supersampling antialiasing methods of determining the local variance as described above.

For each component of each pixel in the image, the cell containing the component is located, and a set of sample points within a filter radius, r, of the component is associated with the pixel component . The number of sample points per component (spc) depends on the relative size of the cell (cellSize) to r. Sampled distances at the sample points are filtered to determine a single weighted average distance that is then mapped to an antialiased intensity of the component of the pixel .

Various filters and sampling strategies are possible. In the preferred embodiment we use a general form of a Gaussian filter, weighting each distance sample by W2, where d is the distance from the sample point to the component of the pixel and W is the sum of the weights used for that component. Similar results can be obtained with box filters, cone filters, negative lobe filters, and other forms of the Gaussian filter.

shows our sampling strategy. Samples are placed in concentric circles near the component for efficient computation of the weights and weight sums. We use a filter radius r of 1.3 times the inter-pixel spacing and sample with 1 spc when cellSize >r (FIG. A), 5 spc when r/2

Rather than concentric circles, the invention can use numerous other strategies to associate sample points with pixel components . Our method is not particularly sensitive to the exact sampling strategy.

Another adaptive sampling strategy, described below, places sample points at the centers of all the cells contained within the filter radius r. This strategy has equally good results.

Cell-Based Antialiasing

The distance field antialiasing methods described above can be implemented in software using scanline-based rasterization. Alternatively, distance fields partitioned into cells, e.g., a bi-quadratic ADF or an optimal ADF including specialized cells, can be antialiased cell-by-cell, i.e., in object-order. Cell-based rendering eliminates tree traversal for locating cells containing the sample points, eliminates redundant setup for computing distances and gradients within a single cell, and reduces repeated retrieval, i.e., memory fetches, of cell data.

In addition, because the cells required for rendering can be represented as a sequential block of fixed sized, self-contained units, i.e., distances and gradients for points within a cell are determined from the cell's distance values, our cell-based approach is amenable to hardware implementations, enabling real-time rendering.

shows a method for antialiasing an object , e.g., a glyph, represented as a two-dimensional distance field in object-order. The method provides adaptive distance-based super sampling, distance-based automatic hinting, and distance-based grid fitting. The resulting antialiased pixel intensity can be rendered on CRT and LCD-like like displays as part of an image. The method is particularly useful for rendering motion blur. We can use mipmapping when the cells of the two-dimensional distance fields are organized in a spatial hierarchy to reduce the number of distance samples required.

The two-dimensional distance field is partitioned into cells . In a preferred embodiment where we use bi-quadratic, adaptively sampled distance fields, the size of each cell is dependent on a local variance of the two-dimensional distance field. Each cell includes a method (M) for reconstructing the two-dimensional distance field within the cell. A set of cells containing a region (dashed line) of the distance field to be rendered is identified .

The region is used to locate a set of pixels associated with the region. A set of components for each pixel in the set of pixels is specified . Then, antialiased intensities are determined for each component of each pixel from distances in the set of cells. Here, the distances are reconstructed from the set of cells. The distances are then mapped to the antialiased intensity, as described above.

In one embodiment, we can determine the distance by locating a single sample point within the set of cells near the component of the pixel and reconstructing the distance at the single sample point from the set of cells. In this embodiment, the two-dimensional distance field can be represented as an optimal ADF including specialized cells.

In our preferred embodiment where we use bi-quadratic adaptively sampled distance fields, this approach is augmented with a special treatment of cells smaller than the filter radius for adaptive distance-based supersampling. Because small cells occur where there is high variance in the distance field, distances in pixels near these cells can be pre-filtered before mapping the distances to intensity.

We initialize a compositing buffer of elements, where each element corresponds to a component of each pixel of the set of pixels. Each cell in the set of cells can be processed independently. In the preferred embodiment, each element consists of a weighted distance and an accumulated weight which are both initialized to zero. When a cell is processed, these weighted distances and accumulated weights are incremented in the buffer elements that correspond to pixel components which lie either within the cell or within a filter radius of the cell's center.

After processing all the cells, the weighted distances are normalized by the accumulated weight for each component of each pixel to produce the distance that is then mapped to the antialiased component intensity. In the preferred embodiment, we use the same Gaussian weights and filter radius as described above.

Our cell-based rendering described thus far always processes every leaf cell in the set of cells, regardless of the relative sizes of each cell to the filter radius. In theory, this provides optimal adaptive distance-based supersampling. In practice, the ADF quadtree can be used as a mipmap to reduce the number of cells.

The ADF quadtree structure allows us to replace small leaf cells with their ancestors, effectively truncating the quadtree at some predetermined cell size. As long as this cell size is less than or equal to ¼ of the inter-pixel spacing, there is no visual degradation in the adaptive distance-based supersampling results. This reduces the number of cells to render the region.

Rendering Overlapping Objects Represented as Two-Dimensional Distance Fields

The present invention provides methods and apparatuses for rendering overlapping objects represented as two-dimensional distance fields that avoid the problems in the prior art. In particular, rather than blending color or intensity values derived from coverage-based antialiasing and rather than combining the overlapping objects into a single composite object prior to rendering, the present invention combines distance values that are determined on-demand during rendering for a component of a pixel. A combined distance is then mapped to determine an antialiased intensity of the component of the pixel.

show a method for rendering, in image-order, a set of objects . Referring to , the set of objects is represented by a set of two-dimensional distance fields , there being one distance field for each object, e.g., a distance field corresponds to an object , and a distance field corresponds to an object .

As shown in , each pixel can include one or more components , typically a red, green, and blue component for RGB rendering. The method determines an antialiased intensity of a component of a pixel . Sets of sample points - are associated with the pixel component , there being a one-to-one correspondence between each set of sample points and each distance field in the set of two-dimensional distance fields . For example, the set of sample points corresponds to the distance field and the set of sample points corresponds to the distance field .

A corresponding distance is then determined for each distance field - using its corresponding set of sample points -, producing corresponding distances -. For example, the corresponding distance is determined for the distance field using its corresponding set of sample points .

The corresponding distances - are then combined to determine a combined distance . The combined distance is then mapped to determine the antialiased intensity of the component of the pixel .

, B, and C show a method for rendering, in object-order, a set of objects . Referring to each object - in the set of objects is represented by a corresponding two-dimensional distance field -. The corresponding two-dimensional distance fields - constitute a set of two-dimensional distance fields . For example, the distance field corresponds to the object and the distance field corresponds to the object .

Referring to , each distance field - in the set of two-dimensional distance fields is partitioned into cells, where each cell is associated with a method for reconstructing the two-dimensional distance field within the cell.

As shown in , to render a region of the set of objects , a set of pixels is located and a set of components for each pixel in the set of pixels is specified . Note that each pixel in the set of pixels can include one or more components, typically a red, green, and blue component for RGB rendering. The method determines an antialiased intensity for each component of each pixel in the set of pixels .

For each two-dimensional distance field - in the set of two-dimensional distance fields , a corresponding set of cells - associated with the region is identified , e.g., the set of cells is identified for the distance field and the set of cells is identified for the distance field .

For each component of each pixel in the set of pixels , an antialiased intensity is determined by first determining , for the component , a corresponding distance - for each distance field - using the corresponding set of cells -. For example, the corresponding distance is determined for the component for the distance field using the set of cells .

The corresponding distances - are then combined to determine a combined distance . The combined distance is then mapped to produce the antialiased intensity of the component of the pixel.

Unlike the prior art, which renders overlapping regions by blending or combining color or intensity values of the rendered objects or by combining coverage-based antialiased values, the methods and combine distance values, thus mitigating color artifacts and blending artifacts exhibited by the prior art.

Unlike the prior methods of Perry et al., the methods and do not generate a combined distance field to represent the composite object prior to rendering. Instead, according to our present invention, a combined distance is determined on-demand during rendering for a component of a pixel by combining distances determined for the component.

There are several methods for combining the corresponding distances - and combining the corresponding distances -. For example, using a positive-inside, negative-outside sign convention for the distance fields, the combining can take a maximum of the corresponding distances to produce a union of the objects or a minimum of the corresponding distances to produce an intersection of the objects. Other combining methods include taking a difference, performing an arithmetic average, or performing an implicit blend of the corresponding distances, to name but a few.

An implicit blend can be used to round corners between the objects while an arithmetic average can be used to provide additional antialiasing by further reducing high frequency content in the rendered region. More generally, the combining can be any arithmetic or conditional operation. Furthermore, the combining can use a procedure or a table to determine the combined distance.

Rendering Cell-Based Distance Fields Using Texture Mapping

The present invention can render a distance field representing an object, such as a two-dimensional glyph, using texture mapping, where the texture mapping constitutes one stage in a multi-stage rendering pipeline. We first provide an overview of each stage of the rendering pipeline, and then describe specific details of various stages along with several embodiments of the invention.

show a method for rendering a distance field representing an object according to the invention.

As shown in , the distance field is partitioned into a set of cells , where each cell includes a set of distance samples and a method for reconstructing the distance field within the cell using the distance samples .

A region of the distance field representing the object is defined. To render the region , we proceed to a first stage in the rendering pipeline, and then to subsequent stages in order.

The first stage selects a set of source cells from the set of cells of the distance field . The selection enables a rendering of the region . For example, the set of source cells covering the region can be selected .

In , a second stage represents each source cell in the set of source cells as a geometric element defined in a world coordinate system. Each geometric element is associated with a texture map , where the texture map includes distance samples of the corresponding source cell .

The geometric element can be described as a quadrilateral, a triangle, a polygon, a set of control vertices constituting a shape with curved edges, to name but a few. The description of the geometric element is typically chosen to match the geometry of the corresponding source cell , although the present invention is not limited to this approach.

A third stage transforms each geometric element from the world coordinate system to a geometric element in a pixel coordinate system. There are many ways to perform the transformation as described below.

A fourth stage texture maps each geometric element to determine a distance for each component of each pixel associated with the geometric element . The texture mapping involves rasterizing the geometric element to produce pixels associated with the geometric element and then determining “colors” of the pixels . In actuality, in the present invention, the colors of the pixels represent distance values of the components of the pixels . The texture mapping uses the distance samples stored in the texture map to perform a reconstruction of the distance field within the geometric element for each component of each pixel associated with the geometric element .

In a fifth and final stage of the rendering pipeline, we map the distance of each component of each pixel to an antialiased intensity of the component of the pixel .

The stages of the multi-stage rendering pipeline can be implemented on a central processing unit, an application specific integrated circuit, fixed-function graphics hardware, programmable graphics hardware, and various combinations, to name but a few.

Programmable graphics hardware, see , Akenine-Moller and Haines, A K Peters, 2002, ISBN 1-56881-182-9, allows the transforming , the texture mapping , and the mapping stages of our multi-stage rendering pipeline to be controlled by vertex and pixel shaders. A vertex shader defines a procedure that operates on a geometric element to produce a transformed geometric element. A pixel shader receives rasterized pixels that can then be manipulated, e.g., colorized, before their eventual arrival to a frame buffer. Vertex and pixel shaders provide enormous flexibility when rendering an object.

In the present invention, we can exploit both types of shaders to perform various aspects of our rendering pipeline. For example, the transforming can be performed by a vertex shader, the texture mapping can be performed by a pixel shader, and the mapping can be performed by a pixel shader.

The texture mapping can perform various interpolation methods to determine the distance for each component of each pixel such as bi-linear interpolation, tri-linear interpolation, bi-quadratic interpolation, high-order, e.g., bi-cubic, interpolation, to name but a few. The texture mapping either approximates the distance for each component of each pixel , thereby producing a less faithful rendering of the object , or determines the distance for each component of each pixel exactly. An approximation method can be used when the method of reconstruction for a source cell is too complicated to implement or requires too much time to execute.

When multiple texturing units are available, the texture mapping can determine the distance of each component of each pixel concurrently and independently, thereby rendering the object efficiently.

The mapping can use one-dimensional texture mapping to determine the antialiased intensity for each component of each pixel . This one-dimensional texture mapping can be used to approximate a filter function. The mapping can also use a lookup table or a pixel shader to determine the antialiased intensity for each component of each pixel .

When rendering multiple distance fields representing multiple objects or when rendering composite glyphs represented by a set of distance fields, the distance fields can overlap and must be treated appropriately, see above.

shows an embodiment including additional steps for the method of the present invention to properly handle overlap conditions. A combining step is performed after the texture mapping . In this embodiment, we combine distances -, determined by the texture mapping , for each component of each pixel to determine a combined distance . We then map the combined distance of each component of each pixel to an antialiased intensity of the component of the pixel .

Unlike the present invention, prior art font rendering cannot effectively render high-quality glyphs using hardware. Prior art hinting is too complicated, with many branches in the execution flow and complicated data structures, to make hardware an effective solution.

Although the prior art uses texture mapping for many purposes, using texture mapping, according to our invention, to render a distance field representing an object is unique. Furthermore, the independent and concurrent determination of distance values for each component of each pixel, according to our invention, is novel.

Unlike the prior art, our invention enables a rendering of a specialized cell such as a corner cell or a two-segment cell of a distance field using a pixel shader to reconstruct the distance field within the cell.

Rendering Using a Progressive Cache—System Structure

shows a system for efficiently rendering a graphics object represented as a two-dimensional distance field. The system includes a rendering pipeline , a cache manager , and a progressive cache .

The pipeline includes rendering stages - connected serially to each other. The first stage receives as input a rendering request , and the last stage outputs a display image . An output of each stage provides an input for a successive stage.

The cache manager connects the pipeline to the progressive cache . The cache manager routes cache elements between the pipeline and the progressive cache.

The progressive cache includes a preprocessed shape descriptor cache , a distance field cache , a distance values cache , an antialised intensities cache , and a colorized image cache . The progressive caches - are arranged, left-to-right in , from a least finished, i.e., least complete, cache element to a most finished, i.e., most complete, cache element, hence, the cache is deemed to be ‘progressive’.

Each cache - includes a data store for input to a next stage of a corresponding stage in the rendering pipeline and for output of the corresponding stage. The one-to-one correspondences between the rendering stages of the pipeline and the data stores are indicated generally by the dashed double arrows -. The stages increase a level of completion of elements passing through the pipeline, and there is a cache for each level of completion.

Rendering Using a Progressive Cache—System Operation

First, the rendering request for a graphics object is generated.

Second, the progressive cache is queried by the cache manger to determine a most complete cached element most representing the display image , e.g., elements of cache types -, which is available to satisfy the rendering request.

Third, a result of querying the progressive cache, i.e., the most complete cached element , is sent, i.e., piped, to the appropriate rendering stage, i.e., the next stage of the corresponding stage of the cache containing the most complete cached element , to complete the rendering of the object. If no cache element is available , then processing of the rendering request commences in stage .

After each rendering stage completes processing, the output of the stage can also be sent, i.e., piped, back to the progressive cache , via the cache manger , for potential caching and later reuse. For example, the output of stage is sent as input to the cache .

Applying compression methods to cached elements in the progressive cache increases the effective size of the progressive cache , thus increasing the overall efficiency of the pipeline by providing a greater cache hit ratio. The distance field cache and the distance values cache are particularly amenable to compression because of the continuous nature of distance fields.

There are numerous ways known in the art to store and locate cached elements in the individual caches -. One such method is hashing, where a key is constructed from the rendering request and then hashed to produce an index indicating a location of a potentially cached element. When the rendering request comprises a glyph of a specified typeface, the key could comprise a bitwise concatenation of a character code for the glyph and a name for the typeface.

To increase the effectiveness of our progressive cache , we can use a least-recently-used, i.e., LRU, method for managing cached elements. In this method, least-recently-used cached elements are discarded when the progressive cache becomes full. It is important to note, however, that our progressive cache can use various memory management methods for cached elements and is not limited to the LRU method.

In another embodiment of the system , there are fewer caches in the progressive cache than there are stages in the rendering pipeline . In this embodiment, not all stages have a corresponding cache. It is sometimes advantageous to eliminate an individual cache in the progressive cache because the corresponding stage is extremely efficient and caching the output in the individual cache would be unnecessary and would waste memory. Furthermore, the output of the corresponding stage may require too much memory to be practical.

One skilled in the art would readily understand how to adapt the system to include various rendering pipelines and various progressive caches to enable a rendering request to be satisfied.

Processing Pixel Components

A pixel comprises one or more components. For example, pixels on a typical CRT or LCD color monitor comprise a red, a green, and a blue component. In our invention, when the pixel includes multiple components, they can be treated independently, as described above, or processed as a single component. When the multiple components are processed as a single component, a color and an alpha value of the pixel can be determined from the antialiased intensity of the single component.

There are two reasons to process the multiple components as a single component. First, it reduces rendering times. Second, when the multiple components cannot be addressed individually or when the relative positions of the individual components are not known, individual treatment of each component is difficult.

When display devices, such as LCDs and OLEDs, have addressable pixel components, it is known in the art that processing the multiple components independently can increase the effective resolution of the device. Our invention can exploit this feature of such devices to provide distance-based antialiasing with superior quality over the prior art.

When rendering on alternative pixel layouts with addressable pixel components our invention has numerous advantages over the prior art. For example, we can use a single distance sample per pixel component and achieve superior quality over the prior art, even when the prior art uses several coverage-based samples per pixel component. Our methods are inherently fast enough on any layout and do not require reusing samples like the prior art. In the prior art, the reuse of samples fails to work on many alternative pixel layouts. Furthermore, by adjusting our rendering parameters, such as the mapping , our methods mitigate the color fringing problems of the prior art and allow us to account for various characteristics of pixel components, such as size and brightness.

Animating Two-Dimensional Objects

shows a flow diagram of a method for animating an object as a sequence of frames according to an animation script . The animation script directs conditions of the object, e.g., the position, size, orientation, and deformation of the object, for each frame in the sequence of frames. The object is represented as a two-dimensional distance field. A pose of the object is updated for each frame in the sequence of frames according to the animation script . The object is rendered using the updated pose and a distance-based antialiasing rendering method .

The two-dimensional distance field representing the object can be acquired from a different representation of the object, e.g., an outline description of the object or a bitmap description of the object.

The updating of the pose for a particular object can be performed by applying various operations to the object including a rigid body transformation, a free-form deformation, a soft-body impact deformation, a level-set method, a particle simulation, and a change to its rendering attributes.

When rendering the object, we associate a set of sample points in the two-dimensional distance field representing the object with a component of a pixel in a frame in the sequence of frames . By determining a distance from the two-dimensional distance field and the set of sample points, we can map the distance to an antialiased intensity of the component of the pixel.

In a preferred embodiment, we partition the two-dimensional distance field representing the object into cells, each cell including a method for reconstructing the two-dimensional distance field within the cell. To render in this instance, we identify a set of cells of the two-dimensional distance field representing the object that contains a region of the two-dimensional distance field to be rendered and locate a set of pixels associated with the region. A set of components for each pixel in the set of pixels is specified. A distance for each component of the pixel is determined from the set of cells and the distance is mapped to the antialiased intensity of the component of the pixel to determine an antialiased intensity for each component of each pixel in the set of pixels.

Distance-Based Automatic Hinting

Hinting in standard font representations is a time-consuming manual process in which a type designer and hinting specialist generate a set of rules for better fitting individual glyphs to the pixel grid. Good hinting produces glyphs at small type sizes that are well spaced, have good contrast, and are uniform in appearance.

These rules provide: vertical stems with the same contrast distribution, with the left and bottom edges having the sharpest possible contrast; diagonal bars and thin, rounded parts of glyphs to have sufficient contrast for transmitting visual structure to the eye; and serifs that hold together and provide enough emphasis to be captured by the human eye, see Hersch et al., “Perceptually Tuned Generation of Grayscale Fonts,” , November, pp. 78-89, 1995.

Note that prior art filtering methods produce fuzzy characters and assign different contrast profiles to different character parts, thus violating important rules of type design. To overcome these limitations, hints are developed for each glyph of each font. There are numerous problems with prior art hinting methods: they are labor intensive to develop, slow to render, and complex thus precluding hardware implementations.

For outline-based fonts, rendering with hints is a three step process. First, the glyph's outlines are scaled and aligned to the pixel grid. Second, the outlines are modified to control contrast of stems, bars, and serifs and to increase the thickness of very thin sections and arcs. Third, the modified outlines are supersampled followed by down-sampling with filtering.

Although our unhinted distance-based antialiasing rendering methods described above compare favorably with prior art font rendering methods that use hinting, it is known that perceptual hinting can improve reading comfort at small type sizes.

Therefore, as shown in , we exploit the distance field to provide distance-based automatic hinting for rendering glyphs at small point sizes. The first step in hinting is to scale and align the distance field to the pixel grid. This can be done automatically from the given or derived font metrics, e.g., the cap-height, the x-height, and the position of the baseline. Front metrics can be derived automatically from the distance field by using a gradient of the distance field to detect specific font metrics, such as the cap-height. The step can include a general transformation of the distance field, e.g., a deformation, to enable a proper alignment to the pixel or pixel component grid.

After applying this form of grid fitting, we use the distance field and its gradient field to provide perceptual hints.

In one embodiment, the direction of the gradient of the distance field is used to detect 820 pixels on the left and bottom edges of the object. By darkening 830 these pixels and lightening 840 pixels on opposite edges, we achieve higher contrast on left and bottom edges without changing the apparent stroke weight. This can be done by decreasing and increasing the corresponding pixel intensities.

In another embodiment, the gradient field is used to provide better contrast for diagonal stems and thin arcs. We note that when a pixel is located on or near thin regions of the glyph, neighbors on either side of the pixel have opposite gradient directions, i.e., their dot products are negative. By detecting abrupt changes in gradient directions, we can darken 850 pixels on these thin regions.

These are only two examples of how the distance field can be used to provide perceptual hints automatically. The distance field can also be used to provide optimal character spacing and uniform stroke weight.

Typesetting Glyphs

Typesetting determines positions of glyphs given input data such as a layout, a starting position of the layout, and associated font metrics for the glyphs such as set-widths and kerning pairs. We define an escapement of a glyph as an offset, e.g., a vector, to a next glyph; the escapement typically includes a set-width of the glyph, the set-width and a kerning value, or numerous other combinations specified by a user, dictated by the layout, or derived from the font metrics. The escapement takes into consideration typesetting on lines, Bezier curves, or other complex paths specified by the layout. “” provides a good overview of typesetting.

Typical applications of typesetting include determining positions of letters in a word and determining line-breaks of a paragraph. Typesetting considers the underlying representation of the glyphs when determining their positions. For example, bitmap fonts cannot be positioned to a fraction of a pixel, whereas outline fonts can. Outline fonts are often hinted, which results in adjustments to the positions of the glyphs.

Typesetting Glyphs Represented as Two-Dimensional Distance Fields

There are numerous ways to typeset glyphs represented as two-dimensional distance fields.

In one embodiment, we turn off distance-based automatic hinting to enable an exact placement of glyph positions as dictated by a typesetting method.

In another embodiment, we use distance-based automatic hinting to grid fit, i.e., align, a distance field representing each glyph to a pixel grid, thus approximating the placement of glyph positions, as dictated by the typesetting method, to a fraction of a pixel.

In another embodiment, to achieve greater accuracy, we use distance-based automatic hinting to grid fit, i.e., align, a distance field representing each glyph to a component of a pixel grid, thus approximating the placement of glyph positions, as dictated by the typesetting method, to an even smaller fraction of a pixel.

In another embodiment, as shown in , a method typesets a set of glyphs . The set of glyphs can represent, for example, letters of a word, or letters of a document. A current glyph is selected from the set of glyphs , e.g., a first letter of the word is selected. A current position is also selected . The selection can be chosen by a user with an input device such as a mouse or derived from a layout for the set of glyphs .

A termination condition is tested , e.g., are all letters of the word typeset, and if satisfied, the method halts. If the termination condition is not satisfied , then the method iterates to determine a next position of a next glyph , e.g., a next letter in the word, where the next glyph is selected from the set of glyphs .

After the selection , the current glyph is represented as a two-dimensional distance field . Then, the next position is determined using the current position , an escapement of the current glyph , and an alignment of the two-dimensional distance field , e.g., the next position is determined as an offset of the escapement from the current position where the offset is adjusted accordingly to the alignment .

Finally, the current glyph is updated to be the next glyph and the current position is updated to be the next position to prepare for the next iteration.

The alignment can be a consequence of a rendering of the current glyph or can be determined without rendering. Note that the alignment can depend on a selected iso-contour of the two-dimensional distance field because the selected iso-contour can change a size of the current glyph .

In another embodiment, the next position is determined using the current position , an escapement of the current glyph , and a selected iso-contour of the two-dimensional distance field . For example, the next position can be determined as an offset of the escapement from the current position , where the offset is adjusted accordingly to the selected iso-contour.

A zero iso-contour may result in no adjustment. A negative iso-contour may result in a larger offset from the current position because the negative iso-contour increases a size of the current glyph . A positive iso-contour may result in a smaller offset from the current position because the positive iso-contour decreases the size of the current glyph .

Generating and Editing Fonts

There are two basic methods for designing fonts. The first is manual. There, glyphs are drawn by hand, digitized, and then outlines are fit to the digitized bitmaps. The second is by computer.

In the latter case, three types of tools are available. Direct visual tools can be used for curve manipulation. Procedural design tools construct the shape of a glyph by executing the instructions of a procedure. The procedure defines either a shape's outline and fills it, or defines a path stroked by a pen nib with numerous attributes, including a geometry and an orientation. Component-based design tools allow designers to build basic components such as stems, arcs, and other recurring shapes, and then combine the components to generate glyphs.

We use a sculpting editor to provide stroke-based design. This is the 2D counterpart to 3D carving as described in U.S. patent application Ser. No. 09/810,261, “System and Method for Sculpting Digital Models,” filed on Mar. 16, 2001, incorporated herein by reference. Stroking can be done interactively or it can be scripted to emulate programmable design tools.

Curve-based design, using Bezier curve manipulation tools similar to those in Adobe Illustrator can also be used. Curve-based design can be combined with methods for converting outlines to distance fields and distance fields to outlines to provide a seamless interface between design paradigms.

Component-based design uses CSG and blending operations on the implicit distance field. This allows components to be designed separately and combined either during editing or during rendering.

We also provide a method for automatically generating ADFs from analog and digital font masters.

For component-based design, our font editor provides the ability to efficiently reflect and rotate ADFs using quadtree manipulation to model the symmetries common in glyphs. Additional features include ADF scaling, translation, and operations to combine multiple ADFs, e.g., CSG and blending.

For stroke-based design, we provide carving tools with a geometric profile to emulate pen nibs. The orientation and size of the simulated pen nib can change along the stroke to mimic calligraphy.

shows a method for generating a two-dimensional distance field from a pen stroke. We sample a pen state during a pen stroke, the pen state comprising a location of the pen during the stroke. This pen state may also include orientation and geometry. From the pen state samples , we generate an ordered list of pen states along the pen stroke. Then, a set of boundary descriptors is generated from the ordered list of pen states. Finally, we generate a two-dimensional distance field from the set of boundary descriptors .

In the preferred embodiment, the boundary descriptors are curves such as cubic Bezier curves.

In the preferred embodiment, we apply a curve fitting process to fit a minimum set of Gcontinuous curves to the path of the pen, with user-specified accuracy. We also generate two additional ordered lists of offset points from this path using the tool size and orientation, and fit curves to these offset points to generate the stroke outlines. The outline curves are placed in a spatial hierarchy for efficient processing. We generate a two-dimensional ADF from this hierarchy using a tiled generator, see U.S. patent application Ser. No. 09/810,983, filed on Mar. 16, 2001, and incorporated herein by reference.

The minimum distance to the outlines is computed efficiently using Bezier clipping. Strokes are converted to ADFs without a perceptual delay for the user. For curve manipulation, we provide a Bezier curve editor.

As shown in , we also provide the ability to convert distance fields to boundary descriptors, e.g., Bezier curves, to provide a seamless interface between all three design paradigms.

In the preferred embodiment, we use bi-quadratic ADFs where this conversion traverses the leaf cells using the ADF hierarchy for fast neighbor searching, generates an ordered list of points along the zero-valued iso-contours of the ADF, and then fits curves as described with reference to , below, to generate the boundary descriptors.

In contrast with the prior art, where boundary descriptor errors are computed from the list of points, we compute the boundary descriptor error directly from the distance field. We pay special attention to sharp corners. Our approach is fast enough to allow users to seamlessly switch between paradigms without any noticeable delay.

shows a method for converting a two-dimensional distance field to a set of boundary descriptors . First, we select an iso-contour of the two-dimensional distance field , e.g., distances with a zero value, or some offset.

Next, we generate an ordered list of points from the iso-contour and the two-dimensional distance field . In our preferred embodiment using bi-quadratic adaptively sampled distance fields, this step visits neighboring cells of the adaptively sampled distance field sequentially using a neighbor searching technique. The search technique exploits a spatial hierarchy of the adaptively sampled distance field to efficiently localize a next neighbor along the iso-contour .

In another embodiment, we generate an ordered list of points by selecting boundary cells in the ADF , seeding each boundary cell with a set of ordered points, and moving each point to the iso-contour of the ADF using a distance field and a gradient field of the ADF .

Then, we initialize a set of boundary descriptors to fit the ordered list of points . The boundary descriptors are initialized by joining adjacent points of the ordered list of points to form a set of line segments that constitute the initial boundary descriptors .

In another embodiment, we initialize a set of boundary descriptors by locating corner points, subdividing the ordered list of points into segments delimited by the corner points, and determining segment boundary descriptors to fit each segment. The union of the segment boundary descriptors forms the initial boundary descriptors .

Corner points can be located by measuring curvature determined from the distance field. In the preferred embodiment, where the distance field is a bi-quadratic ADF, regions of high curvature are represented by small cells in the ADF and hence corner points can be located by using ADF cell sizes.

Once the boundary descriptors are initialized , the boundary descriptors are updated . The updating determines an error for each boundary descriptor by reconstructing the distance field and measuring the average or maximum deviation of the boundary descriptor from the iso-contour.

The boundary descriptors are updated until the error for each boundary descriptor is acceptable, or a predetermined amount of time has elapsed, or a cardinality of the set of boundary descriptors is minimal.

To incorporate the existing legacy of fonts stored in non-digital form, i.e., as analog masters, or in digital form as bitmaps, i.e., as digital masters, our editing system provides a method for generating ADFs from high-resolution bi-level bitmaps.

Analog masters are first scanned to produce bi-level digital masters at a resolution at least four times higher than the target ADF resolution, e.g., a 4096×4096 digital master is adequate for today's display resolutions and display sizes. An exact Euclidean distance transform is then applied to the bitmap to generate a regularly sampled distance field representing the glyph.

Then, we generate an ADF from this regularly sampled distance field using the tiled generator. Conversion from the bitmap to the ADF requires ˜10 seconds per glyph on a 2 GHz Pentium IV processor.

To convert from existing prior art descriptors of glyphs to distance fields where the glyphs are described with a set of boundary descriptors, we apply the method described with reference to FIG. .

Generating and Rendering Component-Based Glyphs

The present invention provides methods for generating and rendering a composite glyph. Unlike prior art methods, which represent components, i.e., elements, by outline descriptors or stroked skeletons and either combine the elements into a single shape descriptor prior to rendering or rasterize each element and combine antialiased intensities or coverage values, the present invention represents elements of the composite glyph as two-dimensional distance fields and renders the composite glyph using these two-dimensional distance fields.

In a preferred embodiment, the rendering combines distances determined for a component of a pixel using the two-dimensional distance fields and then maps a combined distance to an antialiased intensity for the component of the pixel. By combining distance values rather than antialiased intensities or coverage values, the present invention mitigates color artifacts and blending artifacts exhibited by the prior art.

Unlike the prior methods of Perry et al., the present invention does not generate a combined distance field to represent the composite glyph prior to rendering. Instead, according to our invention, the combined distance associated with the component of the pixel is determined on-demand during rendering by combining distances determined from each element.

show a method for generating a composite glyph and rendering a region of the composite glyph in image order, producing a rendered region . The composite glyph is first defined by a set of elements . A set of two-dimensional distance fields is then generated using the set of elements such that the composite glyph is represented by a composition of distance fields - in the set of two-dimensional distance fields . The region of the composite glyph is rendered using the set of two-dimensional distance fields .

shows a preferred embodiment for the rendering of the method . Each pixel in the region can include one or more components , typically a red, green, and blue component for RGB rendering. The rendering determines, for each component of each pixel in the region , an antialiased intensity .

Sets of sample points - are associated with the pixel component , there being a one-to-one correspondence between each set of sample points and each distance field in the set of two-dimensional distance fields . For example, the set of sample points corresponds to the distance field and the set of sample points corresponds to the distance field .

A corresponding distance is then determined for each distance field - using its corresponding set of sample points -, producing corresponding distances -. For example, the corresponding distance is determined for the distance field using its corresponding set of sample points .

The corresponding distances - are then combined to determine a combined distance . The combined distance is then mapped to determine the antialiased intensity of the component of the pixel .

show a method for generating a composite glyph and rendering a region of the composite glyph in object order, producing a rendered region . The composite glyph is first defined by a set of elements . A set of two-dimensional distance fields is then generated using the set of elements such that the composite glyph is represented by a composition of distance fields - in the set of two-dimensional distance fields .

Each distance field - in the set of two-dimensional distance fields is partitioned into cells, where each cell is associated with a method for reconstructing the two-dimensional distance field within the cell. The region of the composite glyph is then rendered using the set of two-dimensional distance fields .

show a preferred embodiment for the rendering of the method . To render the region of the composite glyph , a set of pixels is located from the region and a set of components for each pixel in the set of pixels is specified . Note that each pixel in the set of pixels can include one or more components, typically a red, green, and blue component for RGB rendering. The rendering determines an antialiased intensity for each component of each pixel in the set of pixels .

For each two-dimensional distance field - in the set of two-dimensional distance fields , a corresponding set of cells - associated with the region is identified , e.g., the set of cells is identified for the distance field and the set of cells is identified for the distance field .

For each component of each pixel in the set of pixels , an antialiased intensity is determined by first determining , for the component , a corresponding distance - for each distance field - using the corresponding set of cells -. For example, the corresponding distance is determined for the component for the distance field using the set of cells .

The corresponding distances - are then combined to determine a combined distance . The combined distance is then mapped to produce the antialiased intensity of the component of the pixel.

The elements of the composite glyph of the method and the elements of the composite glyph of the method can have many representations. For example, they can be represented by one-dimensional and two-dimensional shape descriptors such as strokes, outlines, radicals, stroked radicals, paths, and user-drawn curves, strokes, and paths. An element can be represented by a distance field such as a distance map, an adaptively sampled distance field, a procedure for generating distance and a distance function. An element itself can be a composition such as an implicit blend of a first shape descriptor and a second shape descriptor or a skeleton with an offset descriptor.

The elements can be defined and the elements can be defined using a number of approaches. For example, the defining can be performed automatically using a procedure such as automatic shape detection, shape matching, and skeletonization. The defining can be performed interactively by a user or semi-automatically with a user guiding a procedure for defining the elements.

The defining and can be performed from a distance field representing the composite glyph. For example, the elements can be defined by performing distance-based automatic shape detection, shape matching, and skeletonization on the distance field. In addition, the defining can first determine a shape descriptor for an element and then determine a distance function for the shape descriptor to define the element.

A distance field in the sets of two-dimensional distance fields and can be represented as an adaptively sampled distance field, a set of distances stored in memory, or by a procedure, to name but a few.

Several approaches can be used for combining the corresponding distances - in the method and for combining the corresponding distances - in the method . For example, using a positive-inside, negative-outside sign convention for the distance fields, the combining can take a maximum of the corresponding distances to produce a union of the objects or a minimum of the corresponding distances to produce an intersection of the objects.

Other combining methods include taking a difference, performing an arithmetic average, or performing an implicit blend of the corresponding distances, to name but a few. An implicit blend can be used to round corners between the objects while an arithmetic average can be used to provide additional antialiasing by further reducing high frequency content in the rendered region. More generally, the combining can be any arithmetic or conditional operation. Furthermore, the combining can use a procedure or a table to determine the combined distance.

Computational Substrate for Kinetic Typography

The distance field and the spatial hierarchy attributes of our ADF glyph framework can also be used for computer simulation of 2D objects, e.g., glyphs, corporate logos, or any 2D shape. For example, both attributes can be used in collision detection and avoidance, for computing forces between interpenetrating bodies, and for modeling soft body deformation.

Level set methods, which use signed distance fields, can be used to model numerous effects such as melting and fluid dynamics. ADFs are a compact implicit representation that can be efficiently queried to compute distance values and gradients, two important computations required for the methods listed above.

In contrast, determining distance values and gradients from outlines that are moving or deforming is impractical in software for real-time interaction, see Hoff et al., “Fast and Simple 2D Geometric Proximity Queries Using Graphics Hardware,” 3D '01 , 2001. Hoff et al. use graphics hardware to generate a regularly sampled 2D distance field on the fly for deforming curves approximated by line segments.

The implicit nature of the distance field permits complex topological changes, such as surface offsets that would be difficult to model with outline-based fonts. In addition, distance fields can be used to provide non-photorealistic rendering of an animated object to add artistic effect.

Effect of the Invention

The invention provides a novel framework for representing, rendering, editing, processing, and animating character glyphs, corporate logos, or any two-dimensional object.

In a preferred embodiment, the invention uses distance fields to represent two-dimensional objects. The invention includes methods for generating various instantiations of distance fields, including bi-quadratic ADFs and ADFs with specialized cells. Our methods provide a significant reduction in memory requirements and a significant improvement in accuracy over the prior art.

Our distance-based antialiasing rendering methods provide better and more efficient antialiasing than the methods used in the prior art.

Our methods also provide a computational substrate for distance-based automatic hinting, for distance-based grid fitting, for generating and rendering stroke-based and radical-based composite glyphs, for typesetting glyphs, for unifying three common digital font design paradigms, and for generating a variety of special effects for kinetic typography.

Our framework provides numerous advantages: highly legible type even at very small font sizes without the use of labor intensive manual hinting; unparalleled adaptability for flat panel display technologies, such as OLEDs, with numerous and sometimes complex arrangements for the components of a pixel; unique control of rendering parameters that enable interactive user tuning of type for enhanced viewing comfort and personal preference; a computationally clean rendering pipeline straightforward to implement in silicon and to implement on both fixed-function graphics hardware and programmable graphics hardware; and support for advanced applications such as pen-based input.

Although the invention has been described by way of examples of preferred embodiments, it is to be understood that various other adaptations and modifications can be made within the spirit and scope of the invention. Therefore, it is the object of the appended claims to cover all such variations and modifications as come within the true spirit and scope of the invention.

CLAIMS

1. A method for antialiasing, comprising: representing a set of objects with a set of two-dimensional distance fields, there being one distance field for each object; partitioning each two-dimensional distance field into cells; associating, with each cell, a method for reconstructing the corresponding two-dimensional distance field within the cell; identifying, for each two-dimensional distance field in the set of two-dimensional distance fields, a set of cells of the two-dimensional distance field, the set of cells associated with a region of the set of objects; locating a set of pixels associated with the region; specifying a set of components for each pixel in the set of pixels; and determining an antialiased intensity for each component of each pixel in the set of pixels, the determining further comprising: determining, for each two-dimensional distance field in the set of two-dimensional distance fields, a corresponding distance for the component of the pixel using the corresponding set of cells; combining the corresponding distances to determine a combined distance; and mapping the combined distance to the antialiased intensity of the component of the pixel.

2. The method of claim 1 wherein the combining performs a maximum of the corresponding distances to determine the combined distance.

3. The method of claim 1 wherein the combining performs an arithmetic average of the corresponding distances to determine the combined distance.

4. The method of claim 1 wherein the combining performs a union of the corresponding distances to determine the combined distance.

5. The method of claim 1 wherein the combining performs an intersection of the corresponding distances to determine the combined distance.

6. The method of claim 1 wherein the combining performs a difference of the corresponding distances to determine the combined distance.

7. The method of claim 1 wherein the combining performs an implicit blend of the corresponding distances to determine the combined distance.

8. The method of claim 1 wherein the combining performs an arithmetic operation on the corresponding distances to determine the combined distance.

9. The method of claim 1 wherein the combining performs a conditional operation on the corresponding distances to determine the combined distance.

10. The method of claim 1 wherein the combining uses a procedure to determine the combined distance.

11. The method of claim 1 wherein the combining uses a table to determine the combined distance.

12. An apparatus for antialiasing, comprising: a means for representing a set of objects with a set of two-dimensional distance fields, there being one distance field for each object; a means for partitioning each two-dimensional distance field into cells; a means for associating, with each cell, a method for reconstructing the corresponding two-dimensional distance field within the cell; a means for identifying, for each two-dimensional distance field in the set of two-dimensional distance fields, a set of cells of the two-dimensional distance field, the set of cells associated with a region of the set of objects; a means for locating a set of pixels associated with the region; a means for specifying a set of components for each pixel in the set of pixels; and a means for determining an antialiased intensity for each component of each pixel in the set of pixels, the determining further comprising: a means for determining, for each two-dimensional distance field in the set of two-dimensional distance fields, a corresponding distance for the component of the pixel using the corresponding set of cells; a means for combining the corresponding distances to determine a combined distance; a means for mapping the combined distance to the antialiased intensity of the component of the pixel; and a display device for displaying the antialiased intensity of the component of the pixel.

13. The apparatus of claim 12 wherein the display device is a CRT monitor.

14. The apparatus of claim 12 wherein the display device is an LCD monitor.

15. The apparatus of claim 12 wherein the display device is an OLED monitor.

16. The apparatus of claim 12 wherein the display device comprises a set of components, wherein each component in the set of components is individually addressable.

17. The apparatus of claim 12 wherein the display device is a part of a personal digital assistant.

18. The apparatus of claim 12 wherein the display device is a part of a communication device.

19. The apparatus of claim 12 wherein the display device is a part of a gaming device.

20. The apparatus of claim 12 wherein the display device is a part of an appliance.

21. The apparatus of claim 12 wherein the display device is a part of an electronic device.

COPYRIGHT

User acknowledges that Fairview Research and its third party providers retain all right, title and interest in and to this xml under applicable copyright laws. User acquires no ownership rights to this xml including but not limited to its format. User hereby accepts the terms and conditions of the License Agreement.