Character processing method and apparatus

Abstract: There are provided character processing method and apparatus having a function to convert data such as a character or the like which has been encoded by a vector form into data of a dot form. The apparatus comprises a converter to convert data of a vector form into data of a dot form; and a discriminating circuit to discriminate whether a painting process of an outline is omitted or not on the basis of the size of output data after conversion into the data of the dot form. As the result of the discrimination, if the painting process should not be omitted, the painting process is executed. If the painting process can be omitted as a result of the discrimination, the painting process is omitted. With the apparatus, even a large character can be processed at a high speed without deteriorating the quality. A small character can be processed at a high speed at a high quality.

Description: Field of the Invention The present invention relates to character processing method and apparatus having a function to convert a character which has been encoded by a vector form or the like into the character of a dot form. Related Background Art Hitherto, when the data of a vector form is converted into the data of a dot form, there is a case where after the data of the vector form was converted into the data of the dot form, a process to again paint only the outline is executed. However, although the above process is effective to only a small character, there is a problem such that even if the process to again paint the outline is executed to a large character, the quality itself doesn't largely change and an additional time for such a process is required. There is disclosed in EP 0356262 an image processing apparatus for drawing the inside of an image area which is expressed by vector data, said apparatus having a reversal and painting means for sequentially reversing write dots (data) along the storage direction in correspondence to one outline which is specified by vector data, for writing the reversed write dots into an image memory, and for painting the inside of an image area like a closed figure in the image memory. Thus, the area in a closed figure can be painted at a high speed by a simple construction. The optimum reversal and painting method can be selectively switched in accordance with the attribute data of an image area to be painted, so that the optimum painting process can be executed at a high precision and at a high speed. SUMMARY OF THE INVENTION According to the present invention an output apparatus comprising converting means for converting vector data into dot data, said converting means being capable of executing a first painting process of painting an outline of the character based on the vector data and a second painting process of painting an area specified by the outline of the character based on the vector data is characterized by recognizing means for recognizing a size of a character to be output; and selecting means for selecting one of a first mode and a second mode in accordance with a recognition performed by said recognizing means, wherein one memory area and two memory areas are used for said converting means in the first mode and in the second mode, respectively. According to the present invention a method of outputting data comprising converting vector data into dot data, by executing either a first painting process of painting an outline of the character based on the vector data or a second painting process of painting an area specified by the outline of the character based on the vector data, is characterized by recognizing a size of a character to be output; and selecting one of a first mode and a second mode in accordance with said recognition and utilizing one memory area for converting in the first mode and two memory areas for converting in the second mode. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram showing an internal construction of the invention; Fig. 2 is a flowchart showing the operation of the apparatus of the invention; Fig. 3 shows an area assembled on a document screen; Fig. 4 is a flowchart showing the details of the invention; Figs. 5A, 5B and 5C are a diagram showing an example in which data of a dot form is formed according to the invention; Fig. 6 is a flowchart showing the details of another embodiment of the invention; Figs. 7A and 7B are a diagram showing an example in which data is formed according to another embodiment of the invention; and Figs. 8A and 8B are a diagram showing the details of discriminating processes in the embodiment of the invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the invention will be described hereinbelow. The invention can be applied to a system which is constructed by a plurality of apparatuses or a system comprising one apparatus. The invention can be also obviously applied to the case where it is accomplished by supplying a program to a system or an apparatus. Fig. 1 is a block diagram showing a fundamental construction of a Japanese word processor according to the invention. In Fig. 1, reference numeral 1 denotes a CPU (Central Processing Unit) to execute a control of an entire apparatus, arithmetic operating processes, and the like. Reference numeral 2 denotes an ROM (Read Only Memory) serving as memory areas to store programs shown in flowcharts, which will be explained hereinlater, a system actuating program, character pattern, data, and the like. Reference numeral 3 denotes an RAM (Random Access Memory) serving as data memory areas having no use limit. Programs and data for various processes are stored in the RAM 3 and are executed. Reference numeral 4 denotes a KBC (Keyboard Control Section) for receiving key input data from a KB (Keyboard) 5 and transmitting to the CPU 1. Reference numeral 6 indicates a CRTC (Display Control Section); 7 a CRT (Display Device) for receiving data from the CRTC 6 and displaying; and 9 an external memory device such as FD (Floppy Disk Device), HD (Hard Disk Device), or the like. The programs and data are stored into the external memory device 9 and are referred or loaded into the RAM 3 as necessary upon execution. Reference numeral 8 indicates a DKC (Disk Control Section) to control a data transmission and the like; 10 a PRTC (Printer Control Section); 11 a PRT (Printer) as a dot printer such as laser beam printer, bubble jet printer, or the like; and 12 a system bus serying as a path of the data among the above component elements. The invention can be realized in a system comprising a plurality of apparatuses or a single system comprising one apparatus. Further, the invention can be also realized by supplying a program to a work station or the like. The operation of the embodiment with the above construction will now be described with reference to a flowchart of Fig. 2 and Fig. 3 as an example. In step 1 in Fig. 2, information which is transferred from the output device side is fetched as input parameters. The parameters which are transferred from the output device side include: a size of whole output area; information of an actual output area; and the like. In step 2, there is executed a process to read information such as point No., character train, modification type, and the like which have been written in an area which is assembled in a document screen as shown in Fig. 3 and is used to convert data of a vector form into data of a dot form. The area which is used in the specification may be set to any one of ruled lines, a table, a box, and the like. The document screen shown in Fig. 3 is obtained by setting a command or the like by key input data from the keyboard in the case of, for example, a word processor. In step 3, only the necessary data in a character train to be developed is not changed but the data which is unnecessary at that time is replaced to space codes. In step 4, the character code train after completion of the conversion of step 3 is checked and if the character codes are the codes other than the space codes, the data of the vector form corresponding to the character codes and the dot attributes of a straight line/a curve line are read and stored into the memory device and the conversion of x and y coordinate values as data of the vector form is executed in accordance with the character size and the modification type which have been read in step 2. On the other hand, if the character codes are the space codes, the information having no data which has been read is stored into the memory device. In step 5, data of the dot form is formed on the basis of the x/y coordinate data which has been stored in the memory device in step 4. At this time, when the data of the dot form is formed from the data of the vector form on the basis of the size of memory which can be developed and the size of character to be generated, the data of the vector form is once converted into the data of the dot form and, thereafter, a determination is made to see if a process to paint the outline is executed or not. Then, the process is performed. The details will be explained hereinlater. In step 6, the data which has been converted into the data of the dot form is subjected to a modification such as to add a mesh or background pattern to the data on the basis of the modification information read in step 2. In step 7, the necessary portion in the data of the dot form formed in step 6 is transferred to the memory device on the output side. Fig. 4 is a flowchart for explaining the process of step 5 in Fig. 2 in detail. In step 4-1 in Fig. 4, a size of work memory which can be used by the self program is got. In step 4-2, a check is made to see if a memory area corresponding to two characters of the size designated in the work memory to which the size of character fetched in step 2 in Fig. 2 had been given can be reserved or not. As a discriminating method in step 4-2, as shown in Fig. 8A, the memory area to be needed is calculated on the basis of the size (point No.) of the character designated and the output density (DPI: dot per inch) of the output device. If the size of area which is twice as large as such a memory area is smaller than the size of work memory, it is decided that the area can be reserved. If it is equal to or larger than the work memory size, it is decided that the area cannot be reserved. At this time, if a partial area has been set as a work memory area as shown in Fig. 8B, a check is made to see if the area which is twice as large as the size of work memory can be reserved or not on the basis of a vertical width of partial area and the designated character size (lateral width). If the area of two characters of the designated size can be reserved, the processing routine advances to step 4-3. If such an area cannot be reserved, step 4-4 follows. In step 4-3, the work memory which can be used is divided into two memories as shown in Figs. 5A and 5B. In one of the work memories, as shown in Fig. 5A, the data of the vector form is converted into the data of the dot form while painting. In another work memory, as shown in Fig. 5B, the data of the dot form comprising only an outline is formed from the data of the vector form without executing the painting process. As shown in Fig. 5C, the OR of both of the above data which have been divided into two data and converted into the data of the dot form, respectively, is calculated, thereby forming the data of the dot form. In step 4-4, the work memory which can be used is not divided into two work memories but the data of the vector form is converted into the data of the dot form while painting as shown in Fig. 5A as one work memory. After completion of the process of step 4-3 or 4-4, the processing routine advances to step 6 in Fig. 2 and the data is modified. As mentioned above, according to the embodiment, the quality is improved for a small character, and a large character can be processed at a high speed without deteriorating the quality. [Another embodiment] The above embodiment has been described with respect to an example in which the self permitted work memory is divided into two memories and a check is made to see if a character of the designated size can be stored in the divided memory or not and a decision is made to see if the process to convert the data into the data of the dot form comprising only the outline is executed or not. Another embodiment in the case of previously designating the size of character when converting only the outline into the data of the dot form will now be described with reference to a flowchart of Fig. 6 and Fig. 7 as an example. The flowchart of Fig. 6 corresponds to the flowchart of Fig. 4. In step 6-1, if the size of character obtained in step 2 in Fig. 2 is equal to or larger than the size of character which has previously been designated, step 6-2 follows. If it is smaller than the designated size, step 6-3 follows. In step 6-2, in a manner similar to the case shown in step 4-4 in Fig. 4, one work memory is not divided into two memories but is used as a single work area and the data of the vector form as shown in Fig. 5A is converted into the data of the dot form while painting. Steps 6-3 to 6-5 correspond to steps 4-1 to 4-3 in Fig. 4, respectively. In the case where the self permitted work memory has been divided into two memories, a check is made to see if the data of the character of the size to be generated which has been obtained in step 2 in Fig. 2 can be stored into the divided work memory or not. If YES, the data of the dot form obtained by converting the data of the vector form while painting is stored into one of the work memories shown in Figs. 5A and 5B. On the other hand, the data of the dot form obtained by converting only the outline is stored into another work memory. The OR of the data in the two work memories is got and the processing routine is finished. In step 6-6, when the data of the vector form is converted into the data of the dot form, the data of the vector form is once converted into the data of the dot form and, further, only the outline is converted into the data of the dot form and such a process is executed in the case where when the work memory has been divided into two memories, the data of the character of the size to be generated cannot be stored into one of the work memories. As shown in Figs. 7A and 7B, the work memory is not divided into two memories but a process is executed as a single work memory. First, as shown in Fig. 7A, the data of the vector form is converted into the data of the dot form. As shown in Fig. 7B, the process corresponding to Fig. 5B is executed in the same work memory. That is, a process to paint the outline is performed on the same memory as the work memory in which the data of the dot form obtained by converting the data of the vector form while executing the painting process has been stored. As compared with the processes in Figs. 5A and 5B, since the process must be executed twice to calculate the coordinate system of the bit map from the vector data, it takes a slightly long processing time. However, such a process is necessary to hold the quality in the case where the size of character to be generated is smaller than a predetermined point number. As mentioned above, a decision is made to see if the outline is painted or not after the data of the vector form has once been converted into the data of the dot form in dependence on whether the character size is larger or smaller than the designated size by preliminarily considering the quality. Thus, the process can be executed at a high speed without deteriorating the quality. As described in detail above, the size of character which has previously been designated in consideration of the size of prepared work memory and the size of character to be generated or the quality is compared with the size of character to be generated. After the data of the vector form was once converted into the data of the dot form while painting, a determination is made to see if the process to again paint the outline is executed or not on the basis of the result of the size discrimination. Thus, a large character can be processed at a high speed without deteriorating the quality.

Claims: An output apparatus comprising converting means (CPU 1, S4-3, S4-4, S6-2 to S6-6) for converting vector data into dot data, said converting means being capable of executing a first painting process of painting an outline of the character based on the vector data and a second painting process of painting an area specified by the outline of the character based on the vector data, characterized by recognizing means (CPU 1, S2, S6-1) for recognizing a size of a character to be output; and selecting means (CPU 1, S4-2, S6-4) for selecting one of a first mode and a second mode in accordance with a recognition performed by said recognizing means, wherein one memory area and two memory areas are used for said converting means in the first mode and in the second mode, respectively. An apparatus according to claim 1, wherein said selecting means selects the first mode (S4-4) if said recognizing means recognizes the character size larger than a prescribed size and selects the second mode (S4-3) if said recognizing means recognizes the character size smaller than the prescribed size. An apparatus according to claim 1, wherein said selecting means selects the first mode or the second mode in accordance with the character size recognized by said recognizing means and a memory capacity. An apparatus according to claim 3, wherein said selecting means selects the first mode if two memory areas cannot be reserved in accordance with the character size and selects the second mode if two memory areas can be reserved. An apparatus according to any one of claims 1 to 4, wherein said converting means executes the second painting process using one memory area in the first mode and executes the first and second painting processes using two memory areas in the second mode. An apparatus according to any one of claims 1 to 4, wherein said converting means executes the second painting process (S6-6) and then the first painting process using one memory area in the first mode and executes the first and second painting processes (S6-5) using two memory areas in the second mode. An apparatus according to claim 1, further comprising output means for outputting the dot data converted by said converting means. An apparatus according to claim 7, wherein said output means comprises a display device. An apparatus according to claim 7, wherein said output means comprises a printer. An apparatus according to claim 1, further comprising input means for inputting the character to be output. An apparatus according to claim 10, wherein said input means comprises a keyboard. A method of outputting data comprising converting vector data into dot data, by executing either a first painting process of painting an outline of the character based on the vector data or a second painting process of painting an area specified by the outline of the character based on the vector data, characterized by recognizing a size of a character to be output; and selecting one of a first mode and a second mode in accordance with said recognition and utilizing one memory area for converting in the first mode and two memory areas for converting in the second mode. A method as claimed in claim 12, comprising selecting the first mode if the recognition step recognizes the character size larger than a predetermined size and selecting the second mode if the recognition step recognizes a character size smaller than the prescribed size. A method as claimed in claim 12, comprising selecting the first mode or the second mode in accordance with the character size recognized by the recognizing step and the capacity of the memory. A method as claimed in claim 14, comprising selecting the first mode if two memory areas cannot be reserved in accordance with the character size and selecting the second mode if two memory areas can be reserved. A method as claimed in any one of claims 12 to 15, in which the conversion step executes the second painting process using one memory area in the first mode and executes the first and second painting processes using two memory areas in the second mode. A method as claimed in any one of claims 12 to 15, in which the conversion step executes the second painting process and then the first painting process using one memory area in the first mode and executes the first and second painting processes using two memory areas in the second mode. A method as claimed in claim 12, further comprising outputting the dot data converted by said converting step. A method as claimed in claim 18, comprising outputting the dot data to a display device. A method as claimed in claim 18, comprising outputting the dot data to a printer. A method as claimed in claim 12, further comprising inputting the character to be output. A method as claimed in claim 21, comprising using a keyboard to input the character to be output.

Inventors: YOSHIDA MASAYUKI, YOSHIDA, MASAYUKI, YOSHIDA, MASAYUKI, C/O CANON KABUSHIKI KAISHA
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1991
Main classification: H03M5
IPC codes: G09G5, G06T11, G06T3, G06F17