Method and apparatus for generating pattern

Abstract: A character pattern generating apparatus for generating a bit map data from outline data corresponding to a pattern having a curve portion comprises: a discriminating circuit to discriminate a size of pattern data to be output; and a deciding circuit to decide whether the bit map data is generated or not by regarding the curve portion as a straight line from the outline data on the basis of the discrimination of the discriminating circuit. The curve portion is a portion to form a Bezier curve on the basis of the outline data.

Description: BACKGROUND OF THE INVENTION Field of the Invention The present invention relates to pattern generating method and apparatus for generating a character pattern of a bit map font from outline font data corresponding to a pattern having a curve portion. Related Background Art Hitherto, a character pattern generating apparatus for generating a character pattern of a bit map font from an outline font having a curve portion comprises means for calculating a straight line, means for calculating a curve, and means for designating a character size. However, in the above conventional apparatus, a straight line is calculated as a straight line and a curve is calculated as a curve irrespective of a character size and a bit map font pattern is generated, so that there are the following drawbacks. (1) When a small character is generated, the curve portion of a character easily becomes fat and a painted portion is generated. (2) Since a calculation of a curve is executed even in the case of a small character, it takes a time for the calculation and it is difficult to raise the generating speed of a character pattern. As a method of suppressing the drawback of the above item (1), it is known to use a method whereby such a painted portion is prevented by adding additional information. However, if the above method is used, there are the following drawbacks. (3) The calculation becomes complicated and the generating speed of a character pattern becomes slow. (4) Since information is added, the amount of data increases. European patent specification EP-A-0215664 discloses the generation of bit map data from spline data but does not meet the above discussed problems. In accordance with a first aspect of the invention there is provided character generating apparatus as set out in claim 1. In accordance with a second aspect of the invention there is provided a method of generating a character as set out in claim 4. An embodiment of the invention provides pattern generating method and apparatus, in which either one of a mode to generate a curve from curve data and a mode to generate a straight line can be selected in accordance with a size of pattern, a pained portion of a character can be prevented without adding information to character data, and a pattern generating speed can be improved. In order that the present invention may be more readily understood an embodiment thereof will now be described by way of example and with reference to the accompanying drawings in which: Fig. 1 is a diagram showing a character pattern generating apparatus to which the invention was embodied; Fig. 2 is a flowchart for processes of the invention; Fig. 3 is a diagram showing an example of an outline font which is used in the embodiment of the invention; Figs. 4A and 4B are diagrams showing a Bezier curve and a general equeation; Fig. 5 is a diagram briefly showing processes according to the second example; Figs. 6A and 6B are diagrams showing an example of application of the invention in the case of a character "D"; Fig. 7 is a diagram showing a second order Bezier curve and a general equation; Fig. 8 is a diagram briefly showing processes in the second example; Figs. 9A and 9B are diagrams showing an example of application of the invention in the case of a character "J"; and Fig. 10 is a sectional view showing the internal composition of a laser beam printer of the embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT An embodiment of the present invention will be described hereinbelow with reference to the drawings. The invention is not limited to the above embodiment but can be installed to a printer such as laser beam printer, bubble jet printer, or the like or can be also installed to an apparatus such as word processor, typewriter, or the like. Fig. 1 is a diagram showing further practically a feature of the invention. In the diagram, reference numeral 1 denotes means for designating the size of a character; 2 a CPU including therein an area to store a program; 3 outline font data comprising a straight line and a second order Bezier curve; and 4 a bit map memory. The CPU 2 writes the generated bit map data into the bit map memory 4. Reference numeral 101 denotes an algorithm selection means for selecting either a mode which uses a straight line calculating means 102 or a mode which uses second order Bezier curve calculating means 103. Reference numeral 102 denotes the straight line calculating means for developing a portion to be calculated by a straight line in outline font data by a calculation of a straight line. Reference numeral 103 denotes the second order Bezier curve calculating means for calculating a portion to be calculated by an inscription type curve such as a second order Bezier curve in the outline font data by a calculating equation of the second order Bezier. A processing procedure of the invention will now be described with reference to a flowchart of Fig. 2. First, in step S10, a size of character which will be generated from now on is designated. In step S11, a check is made to see if the size of character is equal to or less than a threshold value or not. In this case, the threshold value is set to 15 dots (for instance, a height of character assumes 15 dots) but can be also changed in accordance with the style of type, the kind of character, or the like. For instance, the threshold values for an European character and a Chinese character obviously differ and the threshold value for an European character is smaller than that of a Chinese character. If the character size is determined to be equal to or less than 15 dots in step S11, step S12 follows. In step S12, a curve flag is turned off. In step S13, coordinates of a point to be processed from now on (outline font data 3) are taken. A coordinate point indicative of an outline has attributes of either one of an initial point of a straight line or a curve, an intermediate point of a curve, and a terminal point thereof as shown in Fig. 3. In step S14, a check is made to see if such a point exists or not. If such a point is absent, the processing routine is finished. In step S15, a check is made to see if the above point is a point indicative of a straight line or not. If it indicates a straight line, a process in step S17 of a straight line is executed. In step S16, a check is made to see if a curve flag is ON or OFF. If it is OFF, a process is executed as a straight line irrespective of the attributes of the point. In step S17, a value is calculated as a straight line and outline information is generated. In step S18, a value is calculated as a second order Bezier curve and outline information is generated. Although not shown here, there are various methods of painting the inside of an outline. The area in a character is painted on the basis of the outline information. A Bezier curve, a second order Bezier curve, or the like can be used as such a curve. Fig. 3 shows the relations between the coordinates of points and the attributes. Those data are stored in the outline font data 3 in Fig. 1. As will be obviously understood from the diagram the attribute data is stored in correspondence to the X and Y coordinates. The attribute data 01 indicates a straight line, 02 denotes an initial point of a curve, 04 an intermediate point of a curve, and 08 a terminal point of a curve. Figs. 4A and 4B show Bezier curves and the relations among the initial point, intermediate point, and terminal point of curves by diagrams and equations. A solid line shows the Bezier curve having a feature such that the curve is drawn on the inside of the line (broken line in Fig. 4) which is formed by connecting the initial point, intermediate point, and terminal point by straight lines. Thus, the convex figure which is formed by using the Bezier curve is slightly smaller than the outline which is formed by connecting all of the points by straight lines. Fig. 5 is a diagram showing the case where a curve is formed from the data of one Bezier curve and the case where straight lines are formed. Examples of comparison of characters which are generated according to the invention will now be described with reference to Figs. 6A and 6B. Fig. 6A shows the case where a Bezier curve is generated and reduced characters are formed. Fig. 6B shows the case where Bezier curve data is processed as a straight line and reduced character patterns are formed. Fig. 7 shows a second order Bezier curve and the relations among the initial point, intermediate point, and terminal point of the curve by using a diagram and equations. A solid line shows a second order Bezier curve having a feature such that the curve is drawn on the inside of the line (broken line in Fig. 7) which is formed by connecting the initial point, intermediate point, and terminal point by straight lines. Therefore, the convex figure which is formed by using the second order Bezier curve is slightly smaller than the outline which is formed by connecting all of the points by straight lines. Fig. 8 shows the case where one second order Bezier curve not subjected to the process of the character pattern generating apparatus according to the invention (second order Bezier curve itself) and the case where such a process was performed (straightened). Examples of the characters which are generated according to the invention are shown in Figs. 9A and 9B as a comparison. Fig. 9A shows the case of the conventional pattern generation in which a character is processed as a curve and is reduced. Fig. 9B shows the case of the character pattern generation according to the invention in which a character is processed as a straight line and reduced. As mentioned above, by processing a second order Bezier curve as a straight line by a small character, the following effects can be obtained. (1) When a small character is generated, it is possible to prevent that the character is painted. (2) An area of character increases and a degree of readability rises. (3) Since the process of a curve is replaced by a straight line, a generating speed of the character is improved. As described above, by replacing a curve by a straight line upon generation of a small character, a quality of character can be raised without adding new information to the character data and a character generating speed can be improved. The straightening process of the curve portion in the invention can be executed to the whole pattern to be generated or a part of the pattern. For instance, the process to regard the curve portion as a straight line according to the invention can be also executed to only a curve interval which is shorter than a predetermined amount in the curve portion constructing one pattern. First, Fig. 10 is a sectional view to show the internal composition of a laser beam printer of the embodiment of the present invention as an example of an output generating apparatus to which the pattern generating method and apparatus of the invention can be applied (hereinafter, the laser beam printer is referred to as an LBP). The LBP shown in the diagram can register a character pattern or form a pattern by feeding data from a data source (not shown). In the diagram, reference numeral 100 denotes a main body of the LBP which forms an image onto a sheet as a recording medium after character data (character code) or the like supplied by a host computer 201 connected to the outside was converted into a corresponding character pattern, a form pattern, or the like. Reference numeral 300 denotes an operating panel on which a switch for operation, an LED indicator, and the like are arranged. Reference numeral 101 denotes a printer control unit which executes control of the entire LBP 100 and analyzes the character data or the like supplied by the host computer. The printer control unit 101 converts mainly the character data into the video signals of the corresponding character pattern and outputs to a laser driver 102. The laser driver 102 is a circuit to execute drive control of a semiconductor laser 103 and turns ON or OFF a laser beam 104 emitted from the semiconductor laser 103 in accordance with an input video signal. The laser beam 104 is irradiated onto an electrostatic drum 106 by being swung to the right and left by a rotary polygon mirror 105 and a latent image of the character pattern is formed on the electrostatic drum 106. This latent image is developed by a developing unit 107 arranged around the electrostatic drum 106 and is transferred to the sheet. A cut sheet is used as a sheet. The cut sheets are enclosed in a sheet cassette 108 set in the LBP 100. The sheets are picked up one by one and supplied into the LBP main body by a feed roller 109 and carrying rollers 110 and 111 and are fed to the electrostatic drum 106.

Claims: A character generating apparatus comprising generating means (2) for generating bit map data from outline font data, said generating means including means (102, 103) for generating in response to an input character having both straight and curved lines a bit map which includes both straight and curved lines, and characterised in that there is also provided discriminating means (101) responsive to a selected dimension of an input character when the character is expressed by the generated bit map data so as to generate a curved line of the character as one or more straight lines if the selected dimension is less that a predetermined value. Apparatus according to claim 1 wherein the means for generating curved lines from the outline font data generate Bezier curves on the basis of the outline font data. Apparatus according to claim 1 or claim 2 wherein the selected dimension is the height of the character. A method of generating a character by converting (2) character data in the form of outline font data into bit map data representing a selected character, and characterised by discriminating (101, S11) a selected dimension of a character when expressed by the generated bit map data, and generating a curved line of the character as one or more straight lines if the selected dimension is less than a predetermined value. A method according to claim 4, wherein curved lines are generated as Bezier curves. A method according to either of claims 4 or 5 wherein the selected dimension is the height of the character.

Inventors: KURUMIDA TSUNEAKI, KURUMIDA, TSUNEAKI, KURUMIDA, TSUNEAKI, C/O CANON KABUSHIKI KAISHA
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1991
Main classification: G06K15
IPC codes: G09G5, G06K15, G06T11