Output apparatus

Abstract: There is provided an output apparatus for receiving code data from a data source of a host computer and developing into pattern data and outputting. The apparatus comprises: a pattern generator to generate pattern data; a memory to store the pattern data generated from the pattern generator as a font cache; and a controller for controlling in a manner such that when a residual amount of the memory is less than a capacity enough to store other data which is newly input and whose priority regarding the storage is higher than the priority of the pattern data, the pattern data of the font cache is deleted and the newly input data is stored. An auxiliary character font, form data, or a macro instruc­ tion is used as data which is newly input. The pattern data of the font cache in the memory is deleted on the basis of the priority. The pattern data is a dot matrix font pattern which was developed from a nondot matrix font.

Description: BACKGROUND OF THE INVENTION Field of the Invention The present invention relates to an output apparatus for receiving code data from a data source of a host computer or the like and developing into pattern data and outputting. Description of the Related Background Art In a conventional printer for printing by a dot matrix, a character code or the like which is output from a host computer or the like is input, pattern data corresponding to the character code is read out of a character pattern generator and developed as image data into a frame memory or the like, and thereafter, the image data is output to a recording section of a printer and recorded onto a recording medium. The character pattern data stored in such a character pattern generator can be mainly classified into the following three kinds. 1 ○ A dot matrix pattern to express a character pattern (hereinafter, referred to as a dot matrix font) 2 ○ A font in which an outline or stroke of a character is expressed by coordinate points for an origin of the character (hereinafter, referred to as a vector font) 3 ○ A font in which a dot matrix pattern is compressed by some compressing technique (for instance, run length or the like) and constructed (hereinafter, referred to as a compression font) Among those font data, the dot matrix font can be easily pattern developed into a frame buffer. However, since it is unsuitable for a modification of a character or the like, the use of the vector font which can easily cope with the rotation, enlargement, reduction, etc. of a character has been increasing more and more. On the other hand, as a resolution of output apparatus becomes high, a font capacity increases. To cope with it, a compression font is used. Further, in recent years, a mixed type in which the vector font and compression font are combined has been also proposed. Assuming that the above fonts are generally referred to as "nondot matrix type fonts", although the nondot matrix type fonts have advantages which cannot be obtained by the dot matrix font, they have a problem such that it takes a longer time to develop a pattern into an image memory or the like as compared with the simple dot matrix type font. To solve such a problem, there is a font cache method. According to the font cache method, when a nondot matrix type font is developed into an image buffer or the like, font data or the like whose use frequency is high is previously developed into the dot matrix type font and stored into a cache memory (RAM), and when developing into image data, by using the pattern data, a whole processing speed is improved. In a printer or the like having such a font cache, in association with a variation of a print output, before print data is output from a host computer, font data, auxiliary font data, form data (pattern such as a background of each page or the like), etc. which have previously been formed by the user can be downloaded and registered. The downloaded data is ordinarily stored into a fixed area in the font cache. Therefore, even if the downloading function is not used, a size of font cache is limited. The present invention is made in consideration of the above conventional example and it is a concern of the invention to provide an image output apparatus in which an area is dynamically assured in a font cache memory, an area priority in the memory is given to data to be downloaded, so that the memory can be efficiently used and the processing speed of the whole apparatus is raised. European Patent Specification No. EP-A-0,121,126 discloses a character generator in which pattern data can be stored in a cache. However it does not disclose control of the area available for cache storage. In accordance with the present invention there is provided an output apparatus as set out in claim 1. In order that the present invention may be more readily understood embodiments thereof will now be described by way of example and with reference to the accompanying drawings, in which: Fig. 1 is a block diagram showing a schematic construction of a control system of a laser beam printer according to an embodiment; Fig. 2 is a cross sectional view showing a construction of the laser beam printer of the embodiment; Fig. 3 is a diagram for explaining font data; Fig. 3A is a diagram showing a character pattern shape; Fig. 3B is a diagram showing dot matrix pattern data of Fig. 3A; Fig. 3C is a diagram showing run length data of the pattern data of Fig. 3B; Fig. 4 is a diagram showing an example of a transmission format of auxiliary font data from a host computer; Fig. 5 is a diagram showing an example of a transmission format of form data from the host computer; Fig. 6 is a diagram showing an example of a transmission format of macro instruction data from the host computer; Fig. 7 is a diagram for explaining a used memory space in a memory; Fig. 8 is a flowchart showing a registering process of data from the host computer; and Fig. 9 is a flowchart showing a font caching process. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS A preferred embodiment of the present invention will be described in detail hereinbelow with reference to the drawings. The invention can be embodied in one apparatus or may be also embodied in a system comprising a plurality of apparatuses. [Explanation of the laser beam printer (Fig. 2)] Prior to explaining a construction of the embodiment, a construction of a laser beam printer to which the embodiment is applied will be first described with reference to Fig. 2. Fig. 2 is a cross sectional view showing an internal structure of the laser beam printer (hereinafter, abbreviated to LBP) of the embodiment. The LBP can register character patterns from a data source (not shown) and can also register a standard format (from data) and the like. In the diagram, reference numeral 100 denotes an LBP main body for receiving and storing character data (character code), form data, a macro instruction (an instruction to register a series of command groups in a lump), etc. which are supplied from a host computer (201 in Fig. 1) connected to the outside. The LBP main body 100 makes the corresponding character pattern, form pattern, or the like in accordance with those data and forms an image onto a recording paper as a recording medium. Reference numeral 300 denotes an operation panel in which switches for operation, an LED display, and the like are arranged. Reference numeral 101 indicates a printer control unit for controlling the whole LBP 100 and analyzing character data or the like which is supplied from the host computer. The printer control unit 101 mainly converts character data into a video signal of the corresponding character pattern and outputs to a laser driver 102. The laser driver 102 is a circuit to drive a semiconductor laser 103 and on/off switches a laser beam 104 which is generated from the semiconductor laser 103 in accordance with an input video signal. The laser beam 104 is oscillated to the right and left by a rotary polyhedron 105 and scans on an electrostatic drum 106. Thus, an electrostatic latent image of a character pattern is formed on the drum 106. The latent image is developed by a developing unit 107 arranged around the drum 106 and, thereafter, it is copy transferred onto the recording paper. A cut sheet is used as a recording paper. The cut sheet recording papers are enclosed in a paper cassette 108 attached to the LBP 100 and are taken into the apparatus by a paper feed roller 109 and conveying rollers 110 and 111 and are fed to the drum 106. [Description of the control system of the printer (Fig. 1)] Fig. 1 is a block diagram showing a schematic construction of a control system of the laser beam printer shown in Fig. 2. The control system of the LBP receives character codes sent from the host computer 201 as a generating source of print data and data 121 comprising an auxiliary character font (for instance, a download font), form data, macro registration data, etc. and controls so as to print document data or the like on a page unit basis. Reference numeral 202 denotes an input interface section to input various data from the host computer 201; 203 indicates an input buffer to temporarily store the various data which were input through the input interface section 202; and 204 a character pattern generator. The generator 204 includes an ROM in which pattern data corresponding to character codes which were compressed by, for instance, a run length method, ordinary character codes, and the like are stored, a read control circuit of the ROM, and the like. The generator 204 also has a code converting function such that when a character code is input, an address of the character pattern corresponding to the input character code is calculated. Reference numeral 205 denotes an RAM including a font cache area 207 to store character patterns which were output from the character pattern generator 204 and a storage area 206 to store an auxiliary character font, form data, etc. which were sent from the host computer 201. As mentioned above, by storing the pattern data which was once developed to the character pattern into the font cache area 207 as a font cache, when the same character is printed, there is no need to again decode the same character and to develop to the pattern. Thus, a developing speed to the character pattern becomes fast. Reference numeral 208 denotes a CPU to control the whole control system of the printer. The CPU 208 controls the whole apparatus by a control program of the CPU 208 stored in the ROM 215. Reference numeral 209 denotes a frame buffer in which the pattern data which was developed to the character patterns is stored by an amount of at least one page in correspondence to a print image. Reference numeral 210 denotes an output interface section for generating a video signal corresponding to the pattern data which was read out of the frame buffer 209 and executing the interface control between the output interface section 210 and a page printer printing device 211. Reference numeral 211 denotes the printing mechanism section of a page printer for receiving the video signal from the output interface section 210 and printing image data based on the video signal. [Description of the font data (Fig. 3)] Fig. 3 is a diagram for explaining the difference between a dot matrix font and a nondot matrix font. Fig. 3A is a diagram visually showing an original dot pattern (32 x 32 dots) which is not processed yet. A "*" portion indicates a portion in which an image is formed in black. Fig. 3B shows data in the case where the dot pattern of Fig. 3A was expressed by hexadecimal data. Data of the portion which is printed in black indicates "1" and data of the dot portion which is not printed is shown by "0". The dot pattern shown in Fig. 3B is constructed by 128 bytes and corresponds to the image data which is stored into the font cache 207 and frame buffer 209. Fig. 3C shows data in the case where the dot pattern data of Fig. 3B was compressed by using the run length. The pattern data of 128 bytes is compressed into the data of 38 bytes. The run length method will now be described hereinbelow. 1 ○ A unit of each code is set to four bits. 2 ○ A delimiter code E (hexadecimal number) is provided on each horizontal direction (scanning direction) unit. 3 ○ The code E further indicates that in one scan, all of the bits after the code E are set to "0". 4 ○ The same scan data as the just preceding scan data is expressed by a code F (hexadecimal number). 5 ○ Each of the code units (each consisting of four bits) in one scan is expressed in accordance with the order of white and black and is repeated hereinafter. 6 ○ However, when the length is 13 or more, each code unit is expressed by the sum of a code D (hexadecimal number) and one code unit (four bits) subsequent thereto. That is, the length is expressed by eight bits in only the above case. A numeral surrounded by ○ in Fig. 3C indicates the scan number in a manner similar to Fig. 3A. For instance, the content "8464E" of the 14th scan shows that "from the left side, 8 bits are set to white, 4 bits are set to black, 6 bits are set to white, 4 bits are set to black, and all of the subsequent bits are set to white". On the other hand, the content "44D14E" of the 24th scan denotes that "from the left side, 4 bits are set to white, 4 bits are set to black, 14 (13 + 1) bits are set to white, 4 bits are set to black, and all of the subsequent bits of the 24th scan are set to white". By using the above rule, the character pattern of 128 bytes which are expressed by Fig. 3B is compressed to the data of 32 bytes. In the embodiment, the font data stored in the character pattern generator 204 is set to the compressed nondot matrix font as shown in Fig. 3C. [Description of the data format from the host computer 201 (Figs. 4 to 6)] Fig. 4 is a diagram showing an example of a data format of auxiliary character font registration data which is output from the host computer 201 when an auxiliary character font is stored into the storage area 206 in the RAM 205. The format data is input through the input interface section 202 and is temporarily held in the input buffer memory 203. In Fig. 4, reference numeral 401 denotes an auxiliary character start command to indicate that the subsequent data is the registration data of the auxiliary character font; 402 a parameter having a fixed length of four bytes indicative of the number of characters which are registered as an auxiliary character font; 403 a character code which is assigned to the auxiliary character pattern; and 404 pattern data corresponding to code "1". In this case, total n character patterns are stored. The character pattern is set to a fixed length of 32 x 32 dots. That is, a length of character pattern "1" is set to a fixed length of 128 bytes. On the other hand, it is assumed that the auxiliary character font in the embodiment is set to a dot matrix pattern as shown in Fig. 3B. Fig. 5 is a diagram showing an example of a format of form registration data. In a manner similar to the foregoing auxiliary character registration data, form registration data is output from the host computer 201 and stored into the input buffer memory 203. Reference numeral 501 denotes a start command to indicate that the subsequent data is the form registration data; 502 a parameter having a fixed length indicative of the total number of bytes of the data to be registered as a form; and 503 a data area of the form data as it is. Those form data may be also input from an ROM cassette or the like (not shown) and copied into the RAM. Fig. 6 is a diagram showing an example of a data format when macro registration data is input from the host computer 201. Reference numeral 601 denotes a macro start command; 602 a parameter having a fixed length of four bytes indicative of a length of subsequent macro data; and 603 macro data to be registered. When at least one of the above data is sent from the host computer 201, the data is stored into the storage area 206 in the RAM 205 and is used for the subsequent print control. [Description of the use state of the RAM 205 (Fig. 7)] Fig. 7 is a diagram for explaining the use state of the memory 205. In the diagram, reference numeral 701 denotes a memory map of each construction of the whole apparatus when it is seen from the side of the CPU 208. The memory map 701 has a memory space of 16 Mbytes as a whole. A memory space assigned to the font cache area 207 and storage area 206 is set to a memory space of 1 Mbytes from address "300000H" (H denotes the hexadecimal number) to address "3FFFFFH". Reference numerals 702 to 709 time sequentially indicate use states of the memory space in the memory 205. Reference numeral 702 denotes the use state of the memory 205 just after the power source of the apparatus was turned on, in which all of the areas have been cleared and are not used now. Reference numeral 703 denotes the state in which print data had been sent from the host computer 201 and the printing was executed. The font data which was used to print is developed to the pattern and the dot matrix data is stored as a font cache (207). Reference numeral 704 denotes the state in which the printing was further executed and the capacity of the font cache was enlarged. Although the capacity was set to 400 kbytes in the state of 703, it is increased to 800 kbytes in the state of 704. The number of bytes of the unused area at this time is set to 200 kbytes. When the registration data as shown in any one of Figs. 4 to 6 is transferred from the host computer 201 in the state of 704, since the priority of the registration data which was transferred from the host computer 201 is higher, the font cache is deleted to obtain an area to store the registration data from the host computer 201. In this manner, the font cache is further reduced by 200 kbytes and the registration data from the host computer 201 occupies 400 kbytes as shown in the state of 705. As mentioned above, since the font cache exists to improve the whole print throughput, even if the capacity of the font cache is reduced, the printing itself does not become impossible. Therefore, by paying an attention to the fact that the significance of the data from the host computer 201 is higher, the priority of the font cache data is set to a low priority. Reference numeral 706 denotes the state in which the font cache was further automatically deleted. In the state of 706, the characters are cleared in accordance with a predetermined algorithm on the basis of a use frequency of the font data, an LRU (least recently used, system whereby the pattern which was most recently used is retained, or the like and the cache area is reduced. Reference numeral 707 denotes the state in which the font area was enlarged by printing further another form, printing a character of a large character size, or the like. However, in this case as well, the capacity of the font cache is also limited such that the registration data from the host computer 201 is not erased from the memory 205. Reference numeral 708 denotes the state in which a part of the registration data from the host computer 201 became unnecessary and a clearing instruction of such a partial data was input from the host computer 201. For instance, assuming that macro instructions of Nos. 1 to 8 have been registered, Fig. 7 shows the state in the case where an instruction to clear (or rewrite) only the macro instructions Nos. 3 and 5 was input. Due to this, all of the areas (400 kbytes) which have been allocated by the registration data from the host computer 201 are released and are set to the "not used" state. Thus, the area of the font cache can be further expanded and the font cache increases as shown in the state of 709. [Registration of data from the host computer] Fig. 8 is a flowchart showing a process to register data from the host computer 201 in the printer of the embodiment for the case where the font cache data has a lower priority than the other data required to control the operation of the output apparatus. A control program to execute the data registering process is stored in an ROM 215 in the CPU 208. When data from the host computer 201 is received, step S1 follows and a check is made to see if any vacant area exists in the memory 205 or not on the basis of the number of characters and the total number of bytes of the reception data of the data format shown in Figs. 4 to 6. If YES, step S5 follows. If NO, step S2 follows and a check is made to see if a storage area can be obtained by clearing the data in the font cache 207 or not. If NO, step S3 follows and a "MEMORY OVER" error is displayed and the processing is finished or the processing routine is skipped. If YES in step S2, step S4 follows. In step S4, the data in the font cache 207 is deleted by only the amount of the lack of the capacity of the storage area 206 and step S5 follows. In step S5, the area necessary to store the data from the host computer 201 is obtained in the memory 205. In step S6, the data from the host computer 201 is transferred to the storage area 206 in the memory 205 and registered. [Description of the font caching process (Fig. 9)] Fig. 9 is a flowchart showing a font caching process. A control program to execute the font caching process is stored in the ROM 215 and is executed when the character pattern corresponding to the character code is not stored at present in the font cache 207. However, as described in the states 707 and 708 in Fig. 7, for instance, in the case where a deletion instruction of the macro instruction is input, the area to be deleted can be also allocated as a cache area. Even in this case, there is a large possibility such that the result of the discrimination in step Sll in Fig. 9 is YES. First, in step S11, the total number of bytes of the relevant character pattern data is obtained and a check is made to see if a vacant area enough to store such an amount of data exists in the memory 205 or not. If YES, step S14 follows. Such a discrimination is synthetically executed on the basis of the character size, form, LRU, and the like. If no vacant area exists, step S12 follows and a check is made to see if any font data having a lower priority exists in the font cache 207 or not. If YES, step S13 follows and the font data of the lower priority is deleted from the font cache 207. In the next step S14, a capacity as much as the font data to be newly stored is obtained in the memory 205. In step S15, the font pattern data is developed in the memory 205 and set to the font cache 207. The pattern data which is registered to the font cache 207 is the data which was converted from the nondot matrix form to the dot matrix pattern. Although the embodiment has been described above with respect to the case of an apparatus such as a laser beam printer to print, the invention can be also applied to a display device such as a CRT to display a dot image or the like. On the other hand, although the embodiment has been described with respect to the case where the font data based on the run length method was used as nondot matrix type font data, the invention can be also applied to other various font data such as outline font to store what is called outline coordinates, font data to store a stroke of character, font data formed by synthesizing a bush of Chinese character, and the like. Although the embodiment has been described in the case where the font cache and data registration area were set into the RAM, they can be also replaced by another memory medium (hard disk or the like). Further, although the embodiment has been described with respect to the case where data which is sent from the host computer 201 was set to the auxiliary character font, form data, and macro instruction, the storage form and execution form are not limited in particular. For instance, the execution of macro instruction may be also nested. On the other hand, form instructions can be stored by group of form instructions as it is, by a bit map memory as a whole, or by an intermediate storage system and are not limited to the form data of one page. A nondot matrix type can be also obviously used as an auxiliary character font. As described above, according to the embodiment, there is an advantage such that the memory can be efficiently used by dynamically managing the area to store the data from the host computer and the font cache. In addition, when the data from the host computer does not exist, all of the storage areas in the memory can be used as a font cache. If the data (auxiliary character font, form data, macro instruction, or the like) from the host computer exists, by giving the higher priority to such a data, the storage area in the font cache is not limited. As described above, according to the invention, there are advantages such that by dynamically allocating a storage area in the font cache memory and giving the higher priority of the storage area in the memory to the data which is down loaded, the memory can be efficiently used and the processing speed of the whole apparatus can be made fast.

Claims: An output apparatus comprising: character pattern generating means (204) for generating character pattern data; and memory means (205) having a fixed size storage area, said memory means including a font cache (207) for storing data; and characterised in that there is provided control means (208) for storing, in the font cache part (207) of said memory means, said character pattern data; for storing, in the other part (206) of said memory means other data (121) required to control the operation of the output apparatus; and for varying the storage area of said font cache part in accordance with the relative priority between said character pattern data and said other data. Apparatus according to claim 1, wherein said control means deletes character pattern data stored in said font cache part of said memory means in order to increase the space in said memory means available to said other data. Apparatus according to either claim 1 or claim 2, wherein said other data includes auxiliary character data. Apparatus according to any preceding claim, wherein said other data includes form data. Apparatus according to any preceding claim, wherein said other data includes macro data. Apparatus according to any preceding claim, wherein said character pattern data is a dot matrix font pattern generated from non-dot matrix data. Apparatus according to claim 6, wherein the non-dot matrix data is non-dot matrix font data. Apparatus according to any preceding claim and including a printing device (211). Apparatus according to claim 8, wherein the printing device is a laser beam printer capable of receiving character data, form data and macro data from a host computer (201). Apparatus according to any preceding claim, wherein said other data is registered in a host computer. A method of generating and outputting character data utilising character pattern generating means (204) to generate the character pattern data, and memory means (205) including a font cache (207) for storing data, and characterised by storing said character pattern data in said font cache, storing in the other part (206) of said memory means other data (121) required to control the operation of the output apparatus; land varying the storage area of said font cache part in accordance with the relative priority between said character pattern data and said other data. A method according to claim 11 including deleting character pattern data stored on said font cache part of said memory means in order to increase the space available to said other data. A method according to either claim 11 or claim 12 wherein said other data includes auxiliary character data. A method according to any one of claims 11 to 13 wherein said other data includes macro data. A method according to any one of claims 11 to 14, wherein said character pattern data is a dot matrix font pattern generated from non-dot matrix data. A method according to claim 15 wherein the non-dot matrix data is non dot matrix font data. A method according to any one of claims 11 to 16 wherein the other data is registered in a host computer. A method according to any one of claims 11 to 17 including printing the character data. A method according to claim 18 wherein the character data is printed by a laser beam printer capable of receiving character data, form data and macro data from a host computer (201).

Inventors: MATSUMOTO KOZO, NAGATA SATOSHI, MATSUMOTO, KOZO, NAGATA, SATOSHI, MATSUMOTO, KOZO, C/O CANON KABUSHIKI KAISHA, NAGATA, SATOSHI, C/O CANON KABUSHIKI KAISHA
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1990
Main classification: G06K15
IPC codes: B41J2, G06F3, G06K15, B41J5, G09G5