This invention relates to a method of cutting outline fonts into strokes and parts. More particularly, the invention relates to a method of cutting a character into strokes and cutting the strokes into parts efficiently in an outline font technique of the type which cuts the outline of a character into parts, defines the contour of each part, expresses the character by the collection of the parts and, in outputting the character, develops the contours of the parts forming the character into a bitmap image and outputs the same.
The Japanese language, which employs three different character sets referred to as kanji, hiragana and katakana (these characters shall be referred to collectively as "Japanese characters") differs greatly from the European languages that employ one character set, namely the Roman alphabet. In general, hiragana and katakana (referred to collectively as kana) are designed to be somewhat smaller than kanji and it is possible to combine separately designed kanji and separately designed kana.
A Japanese character is formed inside a design frame referred to as a "body". Unlike the Roman alphabet, in which characters can have different widths from one character to the next, the widths of Japanese characters do not change from character to character. Further, whereas the longitudinal line in the alphabetic character "P", for example, is designed to be vertical, the two longitudinal lines in the kanji are designed to converge slightly at their lower ends in certain styles of type. The reason for this design is to compensate for the illusion of a "top heaviness", which gives the character an unstable appearance. Such compensation for optical illusions is a characteristic of kanji.
Furthermore, since some kanji are composed of many vertical and/or horizontal lines, achieving balance among these lines is important. The blank space between two lines is referred to as "white space". Reproducing a white space to have the same balance as that possessed by the original design is one requirement in achieving a character having high quality.
When a kanji character having these features is expressed by a collection of very small dots, it is difficult to achieve a fine representation smaller than the size of the individual dots. When the number of dots is small, not only is it impossible to represent slender portions of the original design but there are even instances where all horizontal or vertical lines in the character cannot be properly spaced apart, thus producing a deteriorated, indistinct character whose lines run together. In a situation where the number of dots is too small to express a character design, the only function left for the character is merely the transmission and/or recording of information. In such cases, therefore, the chief aim is to prevent character deterioration, rather than to provide attractive design, in order to improve legibility. The question of design, i.e., as to which style of type is being used, is no longer important.
In the case of a bitmap font in which an optimum character pattern is formed by the human hand, a technique employed to prevent character deterioration and maintain legibility is to change the balance of the overall character or thin out some of the vertical or horizontal lines. In the case of a character composed of 16.times.16 dots used to present a display on the screen of a personal computer or word processor, the above-mentioned technique usually is employed. Since the lines thinned out are selected with great care, there are instance where they cannot be noticed at a glance.
However, when a plurality of sizes are required, character patterns conforming to the various sizes must be prepared for bitmap fonts, thus necessitating a memory having a large storage capacity. In order to reproduce characters of various sizes using a small quantity of data without sacrificing the style of the printing type, there has been a shift in favor from bitmap fonts to outline fonts. As shown in FIG. 37, an outline font is one in which the contour of the character is expressed by coordinates in a 1000.times.1000 XY coordinate system. The contour data are outputted upon being bitmapped by a character generating program. With such outline fonts, multiple-point designation (the designation of different printing sizes) is possible. Character quality can be maintained without compromising the style of the printing type regardless of how large the character is made.
Unfortunately, however, outline font techniques presently available have a disadvantage. Specifically, the smaller the point size of a character is made, the greater the decline in character quality produced and the more unattractive the form of the character is made to appear to the naked eye. This is due to rounding error, which arises when the contour of a character expressed in a 1000.times.1000 XY coordinate system is expressed in a physical coordinate system of m.times.m dots (e.g., 16.times.16 dots). FIGS. 38A, 38B are examples of sample of characters outputted using conventional outline fonts and bitmap fonts. FIG. 38A illustrates a sample based upon conventional outline fonts, and FIG. 38B shows an example based upon bitmap fonts. The characters in the upper row of each Figure are composed of 24.times.24 dots, the characters at the left of each lower row are composed of 18.times.18 dots, and the characters at the right of each lower row are composed of 14.times.14 dots. If the number of dots is large, a difference in quality between outline fonts and bitmap fonts is not noticeable. When character size is made small, however, the difference between these fonts manifests itself clearly. Specifically, with the outline fonts of 18.times.18 dots, the sizes of the characters are not uniform (the kanji is larger than the other characters). With the outline fonts of 14.times.14 dots, portions of some characters are made indistinct by deterioration. In the case of the bitmap fonts, the fonts are formed by thinning out portions of the vertical or horizontal lines to prevent deterioration and maintain legibility and to change the overall balance when the number of dots is small. As a result, character deterioration and a variance in character size can be prevented. FIG. 38C illustrates character samples based upon fonts composed of parts in accordance with the present invention, described later.
Thus, with the conventional outline font techniques, fine processing cannot be executed, as is possible with bitmap fonts. When character size is reduced, a variance in size occurs and the characters deteriorate. The reason for this is the occurrence of rounding error, as mentioned above, and the fact that "camouflage" utilizing visual characteristics cannot be applied. Furthermore, with processing using the conventional outline fonts, there are instances where slender character portions that appear needless to the human eye are reproduced upon being emphasized. This occurs because it is not possible to determine which portions of a character are important for the purpose of improving legibility.
In summary, therefore, bitmap fonts created by the human hand have a high quality but require a large memory capacity and do not satisfy the needs of the DTP (desktop publishing) age. On the other hand, the conventional outline fonts are suitable for DTP. However, since the character images are generated by processing, there is a decline in quality where small characters are concerned.
Accordingly, there is a need to be able to generate character images having a high quality equivalent to that of bitmap fonts but by using outline fonts.
A kanji character is by nature a collection of a plurality of vertical and/or horizontal lines. With the conventional outline font technique, however, all of the vertical and horizontal lines are lumped together to express contour lines, as a result of which the above-described problems arise. Accordingly, as illustrated in FIG. 39, contours are partitioned into single strokes strokes STi (i=1, 2, . . . )! such as vertical lines, horizontal lines, oblique lines, right sweeps and left sweeps, the contours are expressed per each stroke STi, the character is captured as a collection of these strokes, the contour data of each stroke are bitmapped by a character generating program and the bitmap is outputted. If this expedient is adopted, the relationship between vertical lines or horizontal lines, etc., is clarified. Moreover, which portions of a character are important and which are unnecessary for the purpose of improving legibility can be ascertained to make various types of control possible.
It is possible to build upon this concept. Specifically, in case of a small character size, recognition of the form of the character is more important than a difference in the style of type. Therefore, if information (basic stroke information) representing the form of the character and information (contour information) representing the style of type can be separated, high-quality characters can be generated from small-size characters, in which legibility is important, to large-size characters, in which reproduction of the distinctive quality of the style of type is important. The basic stroke information mentioned here is information about the basic structure of the character form and is not information regarding central lines that flesh out a character.
The inventors have considered the foregoing points and have developed and provided an outline font technique which includes (1) separating each character into strokes using basic stroke (skeleton) information, (2) dividing the strokes into parts, (3) defining the contour of each part and expressing the character as a collection of the parts, and (4), in outputting the character, developing the contours of the parts constructing the character into a bitmap image and outputting the bitmap image of the character.
FIG. 40 is a diagram for describing a character, strokes and parts. This illustrates a case where the kanji character is separated into strokes (a character-to-stroke cut) and the strokes are divided into parts (a stroke-to-part cut). The collection of the parts forms the contour information. In FIG. 40, the "elements" are illustrated to expedite the explanation and are not units used in actual processing. The kanji character is separated into a number of strokes, each stroke is cut into parts (a starting part, a middle part and an end part) appropriately, and the parts form the contour information.
FIG. 41 is a diagram for describing basic stroke information. A stroke number is assigned to each stroke in accordance with the order in which a character is written, and stroke disposition data (starting point and end point) of the strokes and stroke codes indicating the types of strokes are assigned in the order of the stroke numbers to construct the information. FIG. 41 illustrates the basic stroke information of the kanji character .
As shown in FIGS. 42A and 42B, the contour shape of each part is expressed by arraying, in the counter-clockwise direction, the coordinate values (in the part coordinate system) of the points P1.about.P6, Q1.about.Q4 of the part outlines. FIG. 42A illustrates the shape of the starting part of the kanji character , and FIG. 42B illustrates the shape of the end part of the kanji character .
FIG. 43 is a diagram for describing the structure of a font file in which a character is expressed by a collection of parts. The file includes a header field 1a for storing various font-related information such as the font name and the date of its creation, and a character pointer field 1b which stores a character pointer for pointing to a parts pointer string conforming to the character code. A part pointer field 2 stores (1) disposition data of all parts constructing the character, and (2) pointers to part contour data. A contour data field 3 stores part contour data of all parts. The part disposition data in the part pointer field 2 indicate where in the outline font coordinate system (a coordinate system of 1000.times.1000 dots) a part is disposed. Specifically, the part disposition data indicate the positional coordinates of the part origin (see FIGS. 42A, 42B) in the character coordinate system. As shown in FIGS. 44A and 44B, the disposition data illustrated in FIG. 43 is for a case where the part origin of the starting part of the lowermost horizontal stroke (horizontal line) in the kanji character is given by (56,493), the part origin of the middle part is given by (111,493) and the part origin of the end part is given by (953,493).
In this outline font technology for cutting the outline of a character into parts, defining the contour of each part, expressing the character by the collection of the parts and, in outputting the character, developing the contours of the parts constructing the character into bitmap images and then outputting the images of the character, it is required that a character is cut into strokes and the strokes into parts efficiently.
In conventional practice, however, the operator cuts the character into strokes and cuts the strokes into parts manually one character at a time. This requires an enormous amount of labor.
Further, with the system in which the above operation is performed manually, there are no tools for cutting a character into strokes and cutting strokes into tools in a manner which provides high quality. Accordingly, the original outline font cannot be cut accurately while maintaining the design possessed by the original outline font.