Output method and apparatus

Abstract: An output apparatus for outputting a character or the like by using an outline font comprises: an outline information memory to store outline information which expresses a character by points on the outline; a correction information memory to store correction information to correct a value of the outline information; and a correction unit to correct the outline information stored in the outline information memory by using the correction information stored in the correction information memory, thereby preventing that a slight difference of the outline points of the original character becomes a large difference when the character size is changed and enabling such a slight difference to be correctly expressed when the character is enlarged.

Description: The invention relates to output method and apparatus for outputting by using an outline font. It is known for a printing apparatus to perform printing by using a bit map font or an outline font. When an outline font is used, the data of the outline font is constructed by outline information and auxiliary information to prevent an outline of the same width being seen as different outlines by a calculation error. In the conventional example, however, when the widths of outlines on the outline font data are not equal but are slightly different, even in the case where an original character is developed to a small character, the original outlines are judged as outlines of different widths, so that there are the following drawbacks. (1) When an original character is developed to a small character, the difference of the widths becomes noticeable. (2) If the widths are set to the same value, when a character is enlarged, a delicate line cannot be expressed and the quality of the character deteriorates. European Patent Specification No. EP-A-0,389,131 discloses apparatus for converting outline data representative of a character into dot data in which normally prepared dot data is changed to reduce the difference between outline and reproduction widths of the difference exceeds a predetermined value. In accordance with a first aspect of the present invention there is provided a character processing apparatus as set out in claim 1. In accordance with a second aspect of the present invention there is provided a character processing method as set out in claim 7. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram of a printing apparatus which embodies the present invention; Fig. 2 is a flowchart showing a control of the printing apparatus which embodies the invention; Fig. 3 is a table showing examples of outline information and auxiliary information in the invention; Fig. 4 is a flowchart for developing a character from the outline information and the correction information; Fig. 5 is a table showing an example of a character outline which has been calculated from the outline information and the correction information; Fig. 6 is a diagram showing an outline of the character of Fig. 5; Fig. 7 is a table showing an example of outline information in a conventional technique; Fig. 8 is a table showing a character outline developed by a conventional technique; Fig. 9 shows an example of the character outline of Fig. 8; Fig. 10 is a table showing an example of a character outline calculated from the outline information and the correction information by a method of rounding to the nearest whole number; Fig. 11 is a diagram showing the outline of the character of Fig. 10; Fig. 12 is a table showing a character outline developed by a method of rounding to the nearest whole number by using the conventional technique; Fig. 13 is a diagram showing an example of the character outline of Fig. 12; and Fig. 14 is a diagram showing developing equations of a Bezier curve. DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiments of the present invention will be described in detail hereinbelow with reference to the drawings. The invention can be applied to an apparatus or a system or can be also applied to the case of accomplishing the invention by supplying a program to an apparatus or a system. Fig. 1 is a block diagram for explaining the invention. In the diagram, reference numeral 1 denotes a CPU to control a printing apparatus of the invention in accordance with a program; 2 indicates an input unit which receives data that is transmitted from a host computer; 3 an ROM to store a program to control the printing apparatus such as a program, which will be explained hereinlater, and outline font data; 4 an RAM which is used as a work memory when printing; 5 a print buffer to store print data in a state of a bit map; and 6 a printing unit to print onto a paper in accordance with a bit image developed by the print buffer. A control of the printing apparatus of Fig. 1 will now be described with reference to a flowchart of Fig. 2. In step 1 in Fig. 2, data is received from the host computer. In step 2, a check is made to see if the received data is a character code or a control code. A character is developed into the RAM 4 from the outline font in accordance with the character code. In step 4, the outline font developed in step 3 is transferred into the print buffer 5. In step 5, a check is made to see if the control code is a paper delivery code or not. When it is the paper delivery code, step 6 follows. If NO, step 7 follows. In step 6, the content in the print buffer 5 is supplied to the printing unit 6 and printed, thereby finishing the printing operation. In step 7, other control operations of the printer are executed in accordance with the control code. Fig. 3 is a diagram showing outline information of a character "H" and correction information to calculate the outline of the character "H". In the case of the character "H" in the example, a width of left stem is constructed by 48 dots and a width of right stem is constructed by 50 dots. A flag indicates that the coordinates in the case of 0 relate to the absolute coordinates. In the case of 1, the coordinates indicate the relative coordinates from the position of X and Y just before. In the case of -1, the end of data is shown. A unit of each of the coordinates X and Y and the correction values X and Y is set to dot. Fig. 4 is a flowchart for a subroutine to develop the data of the format shown in Fig. 3. In the diagram, in step 10, a scaling factor in the X direction is substituted to SFX. In step 11, a scaling factor in the Y direction is substituted to SFY. In step 12, a value of the flag is read, thereby judging whether it is equal to -1 or not. When it is -1, step 13 is executed. If NO, step 14 is executed. In step 13, all of the bits corresponding to the dots in the outline drawn are set to ON and the subroutine is finished. In step 14, a check is made to see if the flag is set to 0 or not. When it is equal to 0, step 15 follows. If NO, step 17 follows. In step 15, the X coordinate is calculated on the assumption that the coordinate data indicates the absolute coordinate, and the calculated coordinate value is substituted to X'. In step 16, the Y coordinate is calculated on the assumption that the coordinate data indicates the absolute coordinate, and the calculated coordinate value is substituted to Y'. In step 17, the X coordinate is calculated on the assumption that the coordinate data indicates the absolute coordinate, and the calculation is performed by using the X coordinate just before and the calculated coordinate value is substituted to X'. In step 18, the Y coordinate is calculated by using the Y coordinate just before on the assumption that the coordinate data indicates the absolute coordinate. The calculated coordinate value is substituted to Y'. In steps 15 to 18, DATA(X) denotes data of the X coordinate; DATA(Y) indicates data of the Y coordinate; correction (X) denotes data of the correction X; and correction (Y) represents data of the correction (Y), respectively. It is assumed that the above calculations are executed on the basis of integer values and the decimal portion is omitted. In step 19, a check is made to see if the calculated point is the first point of the outline or not. When it is the first point, step 21 follows. If NO, step 20 follows. In step 20, the coordinates (X, Y) of the point just before and the coordinates (X', Y') which have been calculated at present are connected by a straight line. In step 21, X' is substituted to X. In step 22, Y' is substituted to Y. The processing routine advances to step 12 to process the next data. Fig. 5 is a table showing outline information in the case where the data of Fig. 3 is developed by an algorithm of Fig. 4. The scaling factor is set to 1/10. Fig. 6 relates to an example showing the case of generating on the basis of the invention by Fig. 5. Effects of the invention with respect to the output examples mentioned above are shown in comparison with the conventional techniques. Fig. 7 is a diagram showing data of the same character as that of Fig. 3 by using the conventional technique. Obviously, no correction information exists in the conventional technique. Fig. 8 is a table showing outline information in the case of developing the data of Fig. 7 by using the conventional technique. The scaling factor is equal to 1/10. Fig. 9 relates to an example showing Fig. 8. It will be obviously understood that the quality of the character shown in Fig. 9 is inferior to that shown in Fig. 6. A ratio of the widths of the stems of "H" is equal to 48 dots to 50 dots. When such a ratio is scaled down into 1/10, it becomes 4.8:5.0. When it is further rounded into integers, it becomes 4:5 although the ratio of 5:5 is desirable. Although the left stem is inherently smaller than the right stem by only 4%, in the case of the character shown in Fig. 9 which has been developed by the conventional technique, the left stem is smaller than the right stem by about 20%. On the other hand, according to the invention, a desirable width ratio of 5:5 is derived. (Another embodiment 1) There will be explained an embodiment in the case where the process to omit the fractions is not used but a process to round to the nearest whole number is used in the calculations when executing steps 15 to 18 in Fig. 4 in the construction of the embodiment mentioned above. Fig. 10 is a table showing outline information when the data of Fig. 3 is developed by the algorithm of Fig. 4. The scaling factor is equal to 1/20. In the calculations in steps 15 to 18, the fractions are not omitted but are rounded to the nearest whole number. Fig. 11 shows an example of a character generated according to the invention on the basis of Fig. 10. The effects of the present invention mentioned above will now be explained in comparison with the conventional technique. Fig. 12 is a table showing outline information when the data of Fig. 7 is developed by using the conventional technique. The scaling factor is equal to 1/20. In the calculation of the outline, the fractions are not omitted but are rounded to the nearest whole number. Fig. 13 shows an example of a character generated according to the conventional method on the basis of Fig. 12. As will be obviously understood from Figs. 11 and 13, the widths of the left and right stems according to the conventional developing system are set to two and three dots, respectively. According to the developing system of the invention, however, the widths of both of the left and right stems are equal to three dots. When the conventional technique is used for a character such that a difference of the widths of the stems of the original character is merely equal to 4%, a difference of 33% can occur. According to the invention, however, a character of a higher quality can be generated. (Another embodiment 2) Although the above embodiment has been described with respect to the case where a character is expressed by only straight lines, a similar effect is also obtained for a character which is expressed by a curve. Fig. 14 shows general equations of a Bezier curve. The Bezier curve comprises four points. Two points at both ends are edge points and intermediate two points are control points. A well balanced curve is developed by controlling the edge points and the intermediate points. A postscript ® exists as one of the languages of the controller of the printer as a character using a Bezier curve. Since many examples in which the Bezier curve is applied to characters already exist, their detailed descriptions are omitted here. In this case as well, the invention can be obviously applied. As shown above, by adding the correction information to the outline information of a character, a symmetrical character having a high quality can be generated irrespective of a calculating method such as method of omitting the fractions, method of raising the fractions to the unit, or method of rounding to the nearest whole number. It is also possible to use a method whereby the scaling factor is judged and the process similar to that in the conventional technique is executed up to a predetermined reduction ratio (for example, 1/8). The scaling factor can be also set by using a CRT keyboard or the like. According to the invention as explained in detail above, by providing the correction information of the outline, it is possible to prevent the inconvenience such that character lines of different widths become extremely different due to the output size. The invention can be obviously also applied to a display apparatus such as a CRT or the like or a printing apparatus such as ink jet printer, laser beam printer, or the like. Lastly, in the case of reducing a character having a portion whose width is equal to 48 dots and a portion whose width is equal to 50 dots (reduction ratio is set to 1/10 and the fractions are omitted), 50 dots are reduced into 5 dots and 48 dots are expressed as (50 - 2) and (50/10 - 2/10) is calculated, so that 5 - 0 = 5. That is, in the case of a large output size, although there is a width difference, in the case of outputting by a small size, the character is generated in a state such as not to cause a difference. In this manner, an output character of a high quality is realized.

Claims: A character processing apparatus for generating an output character, the apparatus comprising: first memory means (3) storing coordinate point information which expresses the outline of a character pattern; means (1) for setting a scaling factor in accordance with the size with which the character pattern is to be output; means (1, 5) for generating from the stored coordinate point information output coordinates representing the character pattern which is to be output by multiplying the stored coordinate information with said scaling factor; and characterised by second memory means (3) storing correction information relating to character patterns which include at least two lines which differ slightly in width from one another and comprising values by which the coordinate point information is corrected in order to achieve the width difference of said at least two lines; and in that said generating means are adapted to use the coordinate point information stored in said first memory means and the correction information stored in said second memory means when generating a character pattern which has at least two lines which differ slightly in width so that if the character pattern to be generated is below a predetermined size said two lines have, in the generated character pattern, the same width, and if the character pattern to be generated is above said predetermined size the size relationship between the said two lines is maintained. Apparatus according to claim 1, wherein said generating means is adapted to add the coordinate point information as multiplied by said scaling factor and rounded into integer values to the appropriately scaled correction information, as rounded into integer values, so as to derive the coordinate point information which defines the character pattern to be output. Apparatus according to claim 1 or claim 2, further comprising means for outputting the character pattern generated by said generating means. Apparatus according to claim 3, wherein said output means comprises a printer or a display device. Apparatus according to claim 1, wherein the correction information stored in said second memory means has no effect on generation of a character pattern by said generating means if the character pattern is smaller than said predetermined size. Apparatus according to any preceding claim, further comprising means (2) for inputting character data for a character pattern to be generated. A character processing method comprising: utilising coordinate point information which expresses a character pattern and which is stored in a first memory as coordinate points of an outline of the character pattern; setting a scaling factor in accordance with the size with which the character pattern is to be output; and generating from the stored coordinate point information output coordinates representing the outline of the output character pattern by multiplying the stored coordinate points with the scaling factor, the method being characterised by utilising correction information stored in a second memory means, the correction information relating to character patterns which include at least two lines which differ slightly in width from one another, the correction information comprising values by which the coordinate point information is corrected in order to achieve the width difference of said at least two lines; and in that said generating step further multiplies the values of the correction information stored in said second memory means with the scaling factor and combines the scaled integer values of the correction information with the output coordinates, so that if the character pattern to be generated is below a predetermined size said two lines have, in the generated character pattern, the same width, and if the character pattern to be generated is above said predetermined size the size relationship between the said two lines is maintained. A method according to claim 7, wherein in said generating step the coordinate point information as multiplied by said scaling factor and rounded into integer values is added to appropriately scaled correction information, as rounded into integer values, so as to derive said output coordinates. A method according to claim 7 or claim 8, further comprising outputting the character pattern generated by said generating means. A method according to claim 9, wherein said outputting is carried out hy a printer or a display device. A method according to any one of claims 7 to 10, wherein the correction information stored in said second memory means has no effect on generation of a character pattern by said generating means if the character pattern is smaller than said predetermined size.

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