Abstract:
Methods are proposed for visually evenly spacing of two successive characters taking into account outline shape modifications induced by character grid-fitting. Visually even spacing of characters is obtained by converting the geometric space between two characters into its visually perceived equivalent space. Converting between geometric and visually perceived spaces requires transformations applied to the character outlines for smoothing out the character borders and replacing them by virtual borders which represent the boundaries of the perceived intercharacter space. The optimal visual distance between the origins of two successive characters is obtained by requiring the characters to have a perceived visual space equal or close to an ideal perceived visual space called ideal optical intercharacter space extracted from by design optimally spaced character pairs such as &#34;nn&#34; for lower-case characters and &#34;HH&#34; for capital letters.

Description:
This is a division of Ser. No. 08/043,180 filed Apr. 06, 1993, with title &#34;Method For Producing Contrast-Controlled Grayscale Characters&#34; abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     This invention relates to the art of synthesizing grayscale characters on variable intensity pixmap displays or printing devices. More specifically, it relates to the spacing of grid-fitted character representations at selectable resolution and point sizes, by using their scaled and grid-fitted outline description in order to compute the perceived visual space between two successive characters and to equalize it so as to produce visually evenly spaced characters. 
     The present invention is a divisional application from application Ser. No. 08/043,180, filing date Apr. 06, 1993 entitled &#34;Method for producing contrast-controlled grayscale characters&#34;. It contains the description of a method for visually evenly spacing of successive grid-fitted characters such as the contrast-controlled grayscale characters produced according to the parent application Ser. No. 08/043,180. 
     Previous methods for spacing characters use kerning techniques. Kerning in digital typography is the process of adjusting the spacing of letters pairwise. Each combination of letters needs to be considered for proper visual spacing. Spacing must be visually equal, which implies unequal geometric distance between letters. Kerning values stored in kerning tables specify for given pair of characters such as the &#34;AV&#34; character pair a positive or negative offset to be added to the normal character width of the first character of the pair. The book written by Richard Rubinstein &#34;An Introduction to Type and Composition for Computer System Design&#34; contains more information on state of the art spacing and kerning techniques. UK patent application GB 2&#39;005&#39;502A filed 20th Sep. 1978 entitled &#34;Determining the spacing of characters&#34;, (D. G. Kindersley &amp; N. E. Wiseman) describes a method of spacing characters where the lateral space to be occupied by a character is determined in accordance with the width of a canonical figure having the same sum of moments of area attributes as the character. Previous methods for spacing characters do not take into account the non-linear character deformations generated by the character outline grid-fitting process. This grid-fitting process (see for example parent application Ser. No. 08/043,180) enables generating high-quality bilevel or grayscale characters on low-resolution displays (CRT displays, LCD displays). The present invention enables grid-fitted characters such as the contrast-controlled grayscale characters produced by the method described in parent application Ser. No. 08/043,180 to be visually evenly spaced so as to provide a visually pleasant appearance. 
     SUMMARY 
     The present invention discloses a technique for computing the visually even space between two successive characters, direct neighbours in a line of text. The combination of high-quality character generation techniques such as the one disclosed in parent application Ser. No. 08/043,180 and visually even character spacing techniques produce high-quality text on displays and printers. 
     The new character spacing method described in the present divisional application produces visually evenly spaced characters. Visually even spacing of characters is obtained by converting the geometric space between two characters into its visually perceived equivalent space. Converting between geometric and visually perceived spaces requires transformations applied to the character outlines for smoothing out the character borders and replacing them by virtual borders which represent the boundaries of the perceived intercharacter space. The optimal visual distance between the origins of two successive characters is obtained by requiring the characters to have a perceived visual space equal or close to an ideal perceived visual space called ideal optical intercharacter space extracted from by design optimally spaced character pairs such as &#34;nn&#34; for lower-case characters and &#34;HH&#34; for capital letters. 
     Both the character contrast control technique for producing well contrasted and uniformly appearing grayscale characters (parent application Ser. No. 08/043,180) as well as the technique for producing visually evenly spaced characters (present divisional application) can be effectively used for devices such as displays, terminals, printers, photocomposers or communication equipment. Object of the present divisional application is a method for producing visually evenly spaced characters by computing the optimal visual distance between the origins of two successive character. Object of the present application is also a computer-based system for synthesising evenly spaced characters from grid-fitted ouline descriptions. The method comprises transformations which enable the visually perceived equivalent space between two successive characters to be generated from the geometric space between them. The method enables the computation of the optimal visual distance between two successive characters by equalizing their perceived visual space to the perceived visual space between two characters which have been by design visually evenly spaced such as the &#34;nn&#34; and &#34;HH&#34; character combinations. 
     These objects and other objects and features of the invention will best be understood from the detailed description of the invention. 
    
    
     FIGURES 
     FIGS. 1a, 1b, 1c, 1d, 1e show how successive transformations are applied to geometric character shapes in order to convert their respective geometric intercharacter spaces into their corresponding perceived visual spaces. 
     FIGS. 2a and 2b show the details of the transformation described in FIG. 1d which limits the depth of the white space contributing to the perceived visual space. 
     FIG. 3a shows the complement of the visual space at the right of first character &#34;c&#34;, called &#34;complemented RightVisualSpace&#34;. FIG. 3b shows the visual space at the left of the second character &#34;a&#34; called &#34;LeftVisualSpace&#34;. FIG. 3c shows the resulting visual space between the two characters. 
     FIG. 4 Shows the result of visually evenly spacing of grayscale characters. 
     FIG. 5 Shows the result of visually evenly spacing of bilevel characters. 
     FIG. 6 Shows a computing system for synthesizing visually evenly spaced characters. 
    
    
     DETAILED DESCRIPTION 
     The display of contrast-controlled grayscale characters produces the best results if each individual character is adequatly rendered and, if necessary, stored as a character pixmap image for further use, and if the spacing between two successive characters is adapted to their respective shape combination, or, more precisely, to the perceived visual space between them. The contrast controlled rendering of individual grayscale characters (parent application Ser. No. 08/043,180) and the visually evenly spacing of two successive characters (present application) should be used jointly in order to achieve the best overall display quality. In the following description, the terms grayscale character and variable intensity character are interchangeable. Both terms refer to a character pixmap image, where the pixmap is composed of pixels having a given number of intensity levels, for example 4, 8, 16, 32, 64, 128 or 256 levels. Variable intensity characters can also be used to display color characters by using the variable intensity as an interpolation parameter for interpolating between a foreground colour and a background colour. The disclosed method can be applied to computers and terminals which display variable intensity characters so as to produce high-quality grayscale or colour characters. The method can also be applied to variable intensity dot printers which either print dots whose size depend on the intensity level of the pixels of the produced character pixmap image or which print dots whose density depends on the intensity level of the pixels of the produced character pixmap image. 
     The term grid-fitting means the process of adapting character outlines to the underlying grid, so as to obtain discrete bitmap or pixmap characters having uniformly looking character elements such as vertical bars, horizontal bars, stems and serifs (for more explanations, see R. D Hersch, C. Betrisey, &#34;Model-based Matching and Hinting of Fonts&#34;, Proceedings SIGGRAPH&#39;91, ACM Computer Graphics, Vol 25, No 4, pp 71-80). The term grid-fitting is the general term for the adaptation of character outlines to the grid. The terms weight and phase control or contrast control specify a grid-fitting method specially tuned for producing perceptually-tuned grayscale characters as described in the parent application Ser. No. 08/043,180. The term &#34;perceived visual intercharacter space&#34; explained below has the same meaning as the terms &#34;perceived visual space&#34; or simply &#34;visual space&#34;. The term &#34;ideal optical intercharacter space&#34; explained below has the same meaning as the term &#34;ideal optical space&#34;. The &#34;optimal spacing distance&#34; between two successive characters is the integer spacing value specifying the distance between the origins of the two characters producing visually evenly spaced characters. Distances are generally given in pixel units, either as real numbers, or as integer numbers. One pixel unit is the distance between the centers of two neighbouring pixels, which are lying on the same horizontal scanline and have one common edge border. The target resolution grid is the grid used for displaying the characters, where one grid point or pixel represents one point of the target display, or in the case of a printer, one point of the target printer. 
     Visually Evenly Spacing of Characters 
     It is well known in the art that the best spacing between two characters depends on the shape of those characters and especially on the perceived visual space between both characters. Applying kerning techniques to text printed at high-resolution improves its quality. Due to the low-resolution of the considered display device and to the rendition of grayscale characters by weight and phase control, spacing between grayscale characters is critical. Using automatic kerning techniques substantially improves the quality of the displayed text by producing visually uniform spacing between characters. Any existing automatic kerning method may be used for computing the placement of characters at high resolution. We present here an original method for visually evenly spacing sucessive characters, which takes into account character shape variations due to grid-fitting and is therefore more accurate than a general-purpose size-independent automatic kerning technique. While the disclosed original spacing method is described in the context of grayscale character display, it can be also used for the spacing of grid-fitted bilevel characters, for general purpose character kerning, or as a method for automatically computing kerning values for character pairs. 
     Preferred Embodiment 
     The presently disclosed visually evenly character spacing method is based on a sequence of transformations which convert the geometric space between two grid-fitted successive characters into a space equivalent to the visually perceived space between the two successive grid-fitted character shapes. As a shorthand notation, the space equivalent to the visually perceived space is simply called &#34;visually perceived space&#34; or &#34;visual space&#34;. 
     Converting the geometric intercharacter space to the visually perceived intercharacter space comprises transformations described below as transformations A, B, C and D. For the sake of the explanation, we assume that the background is white and that the displayed characters are black. The same transformations can be applied to characters of any color displayed on a background of any other color. These transformations are applied to the outlines of the characters which are spaced according to the present method. By transforming the character outlines, the geometric intercharacter spaces are converted into their corresponding visually perceived spaces. The terms &#34;outlines&#34;, &#34;contours&#34; and &#34;character borders&#34; are used interchangeably. 
     Transformations A,B,C and D are successively applied to the character outlines. 
     Transformation A: Eliminate white space interior to the character shape as well as white space hidden behind vertical character elements (FIG. 1b) by projecting horizontal lines from the character boundary into the character. 
     Transformation B: Limit interior white concavities to a surface bounded by 45 degrees oriented incident straight line segments (FIG. 1c). 
     Transformation C: Limit the depth of the interior white space of cavities to a value proportional to the size of the cavity aperture (FIG. 1d). 
     Transformation D: Limit the depth of the contributing white space to an absolute value given as a proportion of the character height, i.e. for capitals the caps-height and for lower-case characters the x-height (FIG. 1e). 
     The remaining space between two characters after transformations A, B, C and D is a value giving the amount of the visually perceived space between two characters. To produce uniformly spaced characters, the visual space computed in this manner is reduced or enlarged so that it equals an ideal optical intercharacter space given by the visual space between two characters which have been visually optimally spaced by a type designer. For latin characters, this can be the visual space between two successive characters &#34;nn&#34; for lower-case and &#34;HH&#34; for capitals. The amount of visual space reduction or enlargement divided by the height of the characters (caps-height for capitals, x-height for lower-case characters) gives a negative or positive kerning value which provides a means to improve character spacing. 
     In a preferred embodiment of a rendering-dependent visually evenly character spacing method, the pair of characters which has to be visually evenly spaced on the pixmap display first needs to be synthesized using the &#34;weight and phase&#34; contrast control character synthesizing techniques described in the parent application Ser. No. 08/043,180. This process leads to modified outline descriptions, where each character has its left reference placed at pixel boundaries. Processing steps A, B, C and D are successively applied to said modified outline description. Processing step A is straightforward: horizontal lines are drawn through local vertical shape extrema until the next contour intersection. Each horizontal segment between a local extremum and the next shape&#39;s intersection replaces its corresponding original concave outline shape part. Completely interior outline parts are eliminated and interior white space is thus removed (FIG. 1b). 
     Processing step B aims at prohibiting concave outline shape tangents from having absolute slope values smaller than 1. At any outline location of the character contour processed by step A having an outline shape part in the concave part of the character shape with an absolute tangent slope of 1, the corresponding tangent line with absolute slope 1 is drawn and intersected with the contour obtained by step A. The resulting tangential straight line segment having an angle of +45 degrees or -45 degrees with the horizontal replaces its corresponding contour shape part (FIG. 1c). 
     Processing step C (see FIG. 2a) limits the depth of the contributing white space to a value proportional to the cavity aperture 20, given by the vertical distance between the cavity&#39;s two horizontal maxima points 21 and 22. The cavity depth 24 is obtained by multiplying the cavity aperture by the DepthFactor parameter. Best results have been obtained with DepthFactor=0.21. A vertical line is drawn at a horizontal position given by the x-coordinate of the horizontal maximum with the largest value (point 22) minus (for a right border) or plus (for a left border) the computed cavity depth 24. The intersection of this vertical line with the shape contour obtained by processing steps A and B produces a vertical line segment 23 replacing corresponding contour shape parts. In case (FIG. 2b) the second horizontal maximum 27 has an x-coordinate positioned closer to the character&#39;s center of weight than the vertical line&#39;s x-coordinate, a straight line is drawn from the departure of the vertical line 25 to this second horizontal maximum 27. This straight line segment 26 replaces corresponding contour shape parts. 
     Processing step D gives a global depth limit to the contributing white space which is proportional to the character height: 
     
         GlobalDepthLimit=GlobalDepthParameter·CharHeight 
    
     with CharHeight being the caps-height for capitals and x-height for lowercase characters. A good value for the GlobalDepthParamer is 0.25. Vertical lines located at the positions given by the shape&#39;s horizontal extrema minus (for a right border) or plus (for a left border) the GlobalDepthLimit are drawn and intersected with the character shape. Corresponding exterior vertical line segments replace shape contour parts obtained by the previous processing steps (FIG. 1e). 
     Each of the outline characters having been processed by steps A,B,C and D possesses a left and a right border. The space between the left reference line and the left border is the left visual space LVS (FIG. 3, 31). The space between the left reference line and the right border is the complemented right visual space CRVS (FIG. 3, 30). The ideal optical intercharacter space IOS is the value taken from the intercharacter visual space of two by design visually optimally spaced characters, such as the visually perceived intercharacter space of the &#34;nn&#34; character pair for lower-case and of the &#34;HH&#34; character pair for capitals. For spacing of character pairs composed of a capital and of a lower-case character, the mean value of the capital&#39;s ideal optical intercharacter space and that of the lower-case ideal optical intercharacter space is taken as the ideal optical intercharacter space IOS. The optimal visual distance OVD (1stChar,2ndChar) between the original of a first character and that of a second character is computed as follows: ##EQU1## where CharHeight is the caps-height for capitals, the x-height for lower-case characters and the mean value between caps-height and x-height for the ideal optical space value of a pair of characters composed by a capital and a lower-case character. 
     If necessary, the optimal visual distance OVD is increased in order to avoid parts of the two successive character shapes to overlap. For grayscale characters a minimal spacing value of 0.25 pixels is forseen between extrema located at similar vertical locations, for example between foot serifs. The new, if necessary increased, optimal visual distance OVD is rounded intelligently in order to have the left reference of the second character at a pixel boundary. Intelligent rounding means rounding the so-obtained optimal visual distance in the same way as the ideal optical intercharacter space IOS of two by design visually optimally spaced characters such as &#34;nn&#34; for lower-case characters and &#34;HH&#34; for capitals is rounded to produce the rounded optical intercharacter space. A resulting optimal visual distance OVD which is the same, up to a difference of +-25% of the interpixel distance, as the ideal optical character space IOS, will be rounded in the same way. Function Frac gives the fractional part of a real number. Here is a possible definition of such an intelligent rounding function: 
     
         IF 0.25≦Frac(IOS)&lt;0.5 THEN Round(Value):=Trunc(Value+0.25) ELSIF 0.5≦Frac(IOS)&lt;0.75 THEN Round(Value):=Trunc(Value+0.75) ELSE Round(Value):=Trunc(Value+0.5).                           (2) 
    
     The optimal visual distance Round(OVD) rounded in this manner gives the optimal spacing distance (OSVD) in pixels from the character origin of the first character to the character origin of the second character. 
     For generating kerning tables depending on the size of the rasterized pixmap character images, kerning values for each stored character pair are computed by subtracting the discretized width of the first character from the previously computed optimal spacing distance (OSVD). A discrete kerning value therefore gives the value which has to be added to the discrete width of the first character of two successive characters in order to obtain the space between the origin of the first character and the origin of the second character. 
     Let us enumerate the characterizing steps necessary for generating visually evenly spaced characters according to the present invention. 
     Step 1: Initialize an ideal optical intercharacter space (IOS) by looking up a geometric intercharacter space of two by design visually optimally spaced characters, by converting said geometric intercharacter space into a space equivalent to their perceived visual intercharacter space and by assigning said perceived visual intercharacter space to the ideal optical intercharacter space; Step 2: Compute an optimal visual distance (OVD) between the origins of two successive characters by converting their geometric intercharacter space into a space equivalent to their perceived visual intercharacter space and by computing the distance between the origin of the first character and the origin of the second character so as to make their perceived visual intercharacter space equal to the ideal optical intercharacter space. 
     Step 2 can simply be implemented by positioning successively the first and second grid-fitted outline characters according to the standard width value (real number) of the first character (W), by applying transformations to the outline characters in order to obtain the space equivalent to their perceived visual intercharacter space (PVS), and by computing a space reduction factor SRF=IOS/PVS. The optimal visual distance (OVD) is then obtained by multiplying the width W of the first character with the space reduction factor SFR 
     
         OVD=(SRF.W)                                                (3) 
    
     and by rounding the result in order to obtain the integer optimal spacing distance OSVD=Round (OVD). 
     However, in a prefered embodiment, formula (1) is used, since by introducing the notions of &#34;complemented right visual space&#34; (CRVS) and of &#34;left visual space&#34; (LVS), it is not necessary to position the two grid-fitted outline characters side by side according to the width W of the first character. 
     Computing System For Synthesizing Visually Evenly Spaced Characters 
     A computing system used to synthesize visually evenly spaced characters comprises a memory (60) for storing character outline descriptions and for storing rasterized bilevel or grayscale characters. The computing system also comprises a processing unit (61) operable for initializing the ideal optical intercharacter space by looking up the intercharacter visual space of particularly well designed and spaced character pairs such as &#34;nn&#34; for lower-case characters and &#34;HH&#34; for capitals, operable for transforming the geometric space between two characters to the corresponding perceived intercharacter space, operable for automatically computing the optimal visual distance between the origins of two successive grid-fitted outline characters by transforming the geometric space between the two grid-fitted outline characters into a space equivalent to the perceived visual space and by computing an optimal spacing distance which equalizes their perceived visual intercharacter space to the ideal optical intercharacter space, thereby generating visually evenly spaced characters and operable for sending said visually evenly spaced characters to an input-output unit for display purposes. The computing system further comprises an input-output unit capable of displaying characters (62) such as a cathode ray tube display (CRT), a liquid cristal display (LCD), a variable intensity dot printer or a variable dot size printer on which the visually evenly spaced characters are displayed, respectively printed. 
     Advantages of the Present Invention 
     The main advantage of the present invention is its ability to generate visually evenly spaced grayscale characters at any size and resolution. A further advantage of the invention is that the spacing is optimal in respect to the actual size of the considered pair of characters due to the fact that the perceived visual intercharacter space is computed after grid-fitting the character outlines. One further advantage resides in the fact that the spacing method works with grid-fitted character outlines and can therefore also be applied for spacing grid-fitted bilevel characters. 
     The techniques described in this invention apply mainly to devices producing grayscale and color character images such as displays and to devices producing character images with variable intensity dots such as printers and plotters having a variable dot size. They also apply to devices printing at two intensity levels such as binary displays and printers. 
     It will be appreciated from the preceding description that the invention can be used in a variety of applications to produce scalable typeface or character images, at any resolution and size. Additionally the invention can be used for various devices operable for producing characters, such as displays, terminals, printers, photocomposers or communication devices. 
     REFERENCES CITED 
     U.S. patent application Ser. No. 08/043,180, filing date Apr. 06, 1993 entitled &#34;Method for producing contrast-controlled grayscale characters&#34;, applicants Roger D. Hersch, Claude Betrisey, Justin Bur. 
     UK patent application GB 2&#39;005&#39;502A filed 20 Sep. 1978 entitled &#34;Determining the spacing of characters&#34;, (D. G. Kindersley &amp; N. E. Wiseman) 
     Richard Rubinstein, An Introduction to Type and Composition for Computer System Design, Addison-Wesley, Mass, 1988 
     R. D. Hersch, C. Betrisey, &#34;Model-based Matching and Hinting of Fonts&#34;, Proceedings SIGGRAPH&#39;91, ACM Computer Graphics, Vol 25, No 4, pp 71-80