Printer provided with font memory card

Abstract: A printer provided with a font memory card having an outline font ROM for storing data representing outlines of characters and control parameters and a bit map font memory card detachably connected to the printer by way of a connector. This printer generates print bit map font data corresponding to print fonts which is instructed by a host unit such as a personal computer and the thus generated bit map font data are stored in the bit map font memory card in the order of priority of frequent use thereof.

Description: BACKGROUND OF THE INVENTION The present invention relates to a printer for printing characters one at a time to full page format by converting outline font data into bit map font data which is printed in every page. A so-called electrophotographic printer has recently come into wide use for forming an electrostatic image on a photosensitive drum with use of a laser beam or the light of an LED in order to print printing data prepared by a personal computer, a word processor and the like on a print sheet. The electrophotographic printer employs function formula such as Bezier Mathematical Curves, Spline Mathematical Curves and the like which represent the outline of characters instead of the conventional dot matrix fonts (bit map fonts), and an outline font for storing therein connection points of the function formulas, parameters and the like for controlling the connection points. Using this outline font, it is possible to change the sizes and formats of characters such as bold face and hollow outline with ease. However, the use of this outline font has such a problem that it takes much time for processing function at high level in order to generate bit map data based on this outline font. To solve the problem, a font cache memory is provided for omitting generation of the bit map font from outline font in case of reuse of the same characters and so as to speed up the processing speed. That is, at the time when the bit map font is generated, the thus generated bit map font is stored in the font cache memory and at the time when the same characters are printed next and thereafter, the same characters can be printed based on the bit map data font in the font cache memory, thereby facilitating high speed printing. Conversion of the outline fonts into the bit map fonts having the specific sizes are previously stored in the program for controlling the printer. Once the printer is turned on, the outline fonts are converted into the bit map fonts having the specific sizes which are instructed by the control program and stored in a font cache memory. When the printer receives a printing character code from a host unit such as personal computers and word processors, the outline fonts are already converted into the corresponding bit map fonts. Since the conventional printers are controlled by a variety of application programs, font types and character sizes are differentiated corresponding to the application programs to be used in the printers. The font types and the character sizes are also differentiated by users of the printers. Accordingly, even if the outline fonts are converted into the bit map fonts, the bit map fonts are not frequently used. Since the types of the bit map fonts which are previously converted and stored in the printer are specified, the use of them results in a waste of time unless they match the type of the fonts to be used by the user. GB-A-2,218,550 discloses a print apparatus with a detachable font memory as indicated in the preamble of claim 1. The detachable font memory in form of a font cartridge comprises a font pattern memory and a non-volatile memory for storing frequency of use information for each pattern. This information is used to control updating of the font cache from the font pattern memory via a converter. SUMMARY OF THE INVENTION It is a first object of the present invention to provide a printer having bit map fonts corresponding to a variety of application programs. It is a second object of the present invention to provide a printer capable of converting outline fonts into bit map fonts without taking much time when the application program or the user is changed. A printer according to the present invention is disclosed in claim 1. Claims 2 to 5 disclose further embodiments of the invention. The printer comprises an outline font ROM (Read Only Memory) for storing therein data representing outlines of character and control parameters and a bit map font memory card detachably connected to the printer by way of a connector attached thereto and is characterized in generating bit map font data for printing based on the data stored in the outline font ROM and storing the generated bit map font data in the bit map font memory card in the order of priority of frequent use thereof. With such an arrangement, the font instructed by the host units such as personal computers or word processors is generated as the bit map font data based on the data stored in the outline font ROM and stored in the bit map font memory card. At this time, since the bit map font data is stored in the order of priority of frequent use thereof for every font type and character size, it is possible to provide a printer having bit map font corresponding to a variety of application programs and to provide a printer capable of reducing time involved in conversion from the outline font into the bit map font of the printer when the application program or the user is changed. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram of a printer according to an embodiment of the present invention; Fig. 2 is a block diagram of a font memory card employed in the printer according to the present invention; Fig. 3 is a view showing storage area of the stored data in the memory card of Fig. 2; Fig. 4 is a view showing in detail a font attribute address table in the storage area of Fig. 3; Figs. 5(a) and 5(B) are views respectively showing examples of character attribute address tables in the storage area of Fig. 3; Fig. 6 is a view showing in detail an empty block table of Fig. 3; Fig. 7 is a view showing in detail an arrangement of a bit map font area of Fig. 3; and Figs. 8(A), (B) and 8(C) are flowcharts showing operations for controlling to write the bit map font data in or read the bit map font data from the font memory card of Fig. 2. DESCRIPTION OF THE PREFERRED EMBODIMENT A printer according to a preferred embodiment of the present invention will be described with reference to Figs. 1 to 8. A printer 1 comprises an interface 2 connected to a host unit 20, a system bus 3 connected to the interface 2, a microprocessor 4, a program ROM 5, a working memory 6, an outline font ROM 7a, an image memory 8, a print engine interface 9, a battery backupped nonvolatile memory 11 and a connector 12 respectively connected to the system bus 3 and a font memory card 13 detachably connected to the printer 1 by way of the connector 12. Each element set forth above operates as follows. The host unit 20 comprises a personal computer, a word processor, an image reader and the like for preparing a printing data. The interface 2 is an interface circuit comprising a well-known RS232C Interface, a parallel interface and the like. The microprocessor 4 is a control circuit for controlling each element of the printer 1 and a control program thereof is stored in the program ROM 5. The working memory 6 is a memory for storing and managing data exchanged between the host unit 20 and the working memory 6 by way of the interface 2. The outline font ROM 7a stores therein function expressions such as Bezier Mathematical Curves and Spline Mathematical Curves for representing outlines of the characters, connection points, parameters for controlling them and the like. The processor 4 generates bit map font data for printing based on the function expressions and the parameters when it receives printing character codes from the host unit 20. The font cache memory 6b is a cache memory for temporarily storing the thus generated bit map font data and forms a part of the working memory 6. The image memory 8 comprises a RAM (Random Access Memory) for storing printing data, e.g. for one page which are edited and imaged by the processor 4. The print engine 10, which carries out printing on printing sheets based on the printing data stored in the image memory 8, comprises a printing sheet feeding system, printing process means for electrophotographic printing and the like. The print engine interface 9 is an interface circuit which reads the printing data from the image memory 8 in accordance with the instruction from the processor 4 and transfers the thus read data to the print engine 10. The print engine interface 9 receives a print control signal from the print engine 10 and send the same print control signal to the processor 4 and receives the instruction from the processor 4 and transfer the same instruction to the print engine 10. The nonvolatile memory 11 comprises the memory and the like backupped by the battery as mentioned above and stores data for initializing the printer 1 when the power is turned on. The font memory card 13 composed of a nonvolatile memory selects the bit map font data stored in the font cache memory 6b or in the font memory card 13 itself based on the frequency of use thereof, and stores the bit map font data therein, described later. Described hereinafter is the case where the font memory card 13 comprises the memory backupped by the battery. Fig. 2 is a block diagram of the font memory card detachably attached to the printer of the present invention. The font memory card 13 comprises a static random access memory 130 (hereinafter referred to as S-RAM), a battery 150 and a control circuit 160. The S-RAM 130 is connected to an address bus and a data bus of the system bus 3 (refer to Fig. 1) of the printer 1 by way of the connector 12 and receives a power voltage and various control signals such as a read signal, a write signal and a chip select signal from the control circuit 160. The control circuit 160 is connected to the system bus 3 and the power supply (+5V) of the printer 1 and also to the battery 150. The control circuit 160 decodes the address and generates the control signals such as the read signal and the write signal which are supplied to the S-RAM 130 and keep to supply the voltage to the S-RAM font memory card even if the font memory card 13 is detached from the connector 12. It means that the font memory card 13 is a nonvolatile memory card. The font memory card 13 issues a signal for detecting the insertion of the card. One of the terminals of the font memory card 13 is connected to 0V whereas a detecting signal 123 is issued by a pull-up resistor as illustrated in Fig. 2, and a Schmitt trigger type inverter 121 connected to the printer side. In this case, the processor 4 decides the presence of the font memory card 13 by sensing or interrupt. Fig. 3 is a view showing a storage area of the stored data in the S-RAM 130. The S-RAM 130 comprises the followings elements, counting from a starting address thereof, i.e., a memory card ID number storage area 131 for storing user's information of the font memory card 13 and the like, a memory card type information storage area 132 for storing types for distinguishing from other memory cards formed of a mask ROM and the like and information of a storage capacity of the font memory card 13 and a total font number storage area 133 for storing the total font number representing the number of types of fonts stored in the font memory card 13. The S-RAM 130 further comprises the following elements next to the total font number storage area 133, i.e., a font attribute address table area 200 for storing a managing number given to each font type stored in the font memory 13, the number of frequency of use, starting and ending addresses of the character attribute address table, described later and a free area 134 as a spare area of the font attribute table 200. Following by the free area 134 are a character attribute address table 300 for storing a character code managing number corresponding to a character set table, a block address number representing the block where the bit map font data corresponding to the character code managing number is stored and the number of blocks to be used, a free area 135 as a spare area of the character address table area 300, a bit map font area 136 for storing various bit map fonts and a free block retrieve table area for dividing the areas extending from the font attribute address table 200 to the bit map font area 136 into blocks of r bytes (r being an integer, e.g. 1, 2, 3, ... n) and disposing a free block retrieve flags which represent an information of the unused blocks among the bit map front blocks. Components of each table will be described more in detail hereinafter. Fig. 4 shows the font attribute address table, Fig. 5(A) shows a character attribute address table and and 5(B) show aother character attribute address table. The contents of the attribute address table 200 will be described from left column to right column thereof as illustrated in Fig. 4. The attribute address table 200 comprises column 201 for storing type codes (TF 1 to TF n ), i.e., numbers for managing font types (type faces), column 210 (SZ 1 to SZ n ) for storing font sizes and column 220 for storing frequencies of use of a combination of a certain type code TF e and a certain font size SZ e . The attribute address table 200 further comprises column 230 for storing the address SAD which represents the starting address of the memory area to store the character attribute address table relating to the combination of the font size SZ e and the type code TF e , column 240 for storing the ending address of the character attribute address table, the starting address of which is stored in the column 230 and column 250 for storing memory capacities (Q 1 to Q n ) which are the totals of the memory capacities used for the character attribute address table represented by combinations of the TF e and the SZ e , and the memory capacities used for the corresponding bit map fonts. That is, the font attribute address table 200 as illustrated in Fig. 4 comprises the number of n types of fonts and it also means that it may comprise n types of combination of font types and character sizes because there are cases where the font types are same but the character sizes are differentiated. As shown in Fig. 3, the character attribute address table 300 is the table representing the storage addresses of the bit map fonts corresponding to the font character codes specified by the combination of the font types (TF n ) and sizes of characters (SZ n ). Accordingly, the character attribute address table exemplifies, as illustrated in Fig. 5(A), the combination of the font types TF 1 and the character sizes SZ 1 in the table of Fig. 4. The character attribute address table 300 comprises column 301 for storing the character codes (character managing numbers CD 1 to CD m ) representing codes corresponding to the character set table, not shown, column 310 for storing block start addresses BSADs which represent starting addresses in which bit map fonts corresponding to the character codes stored in the column 300 and column 320 representing memory capacities BQs of the bit map font data which correspond to the character codes stored in the areas of table 300. The combination thereof are formed as many as the characters, i.e. m. Accordingly, SAD 1 of the font attribute address table 200 represents the address of CD 1 while the EAD 1 represents the address of BQ m · Likewise, the character attribute address table 300 formed by the combination of the types of fonts TF 2 and the sizes of character SZ 2 is illustrated in Fig. 5(B). The character attribute address tables 300 are formed as many as the combination of n TFs and n SZs. Fig. 6 is a view showing a free block table. An arrangment of the free block 400 will be described more in detail with reference to Fig. 6. The free block table is the table for storing the flag T indicating that the blocks BK o to BK ℓ are used or not, wherein the blocks BK o to BK ℓ mean the blocks formed by dividing the bit map font area 136, the character attribute address table 300, the font attribute adress table 200 and the free areas 134 and 135 by r bytes per block. The flag T indicates that the free area is not used if T is logical "0" and the free are is used if T is logical "1". The flag T is formed of data comprising more than one bit. The bit map font area 136 for storing the bit map font data will be described with reference to Fig. 7 showing the structure of the bit map font data. The bit map font area 136 is the area where the bit map fonts of all the pairs composed of the font types TFs and the character sizes SZs of the font attribute address table are stored and is divided into blocks BK o to BK p of r bytes. A block among the blocks, e.g. the block BK o stores in the starting address S o thereof the numbers of bytes to be actually used therein. A logical "0" is stored in an index register IX o located in the ending address of the block BK o when the bit map data corresponding to the character code CD can be stored in the block BK o while a starting address of the next block is stored in the index register IX o located in the ending address of the block BK o when the bit map data corresponding to the character code CD can not be stored in the block BK o . An arrow A shows that the index register indicates the starting address of the next block for storing the remainder of the bit map font data when the bit map data corresponding to the character code CD can not be stored in the block BK o . Designated at 512 in Fig. 7 are bit map font data. An operation of the printer having the arrangement as illustrated in Figs. 1 to 7 will be described with reference to Figs. 8(A) to 8(C). The processor 4 starts an initialization processing, after the power supply is turned on, based on initializing data stored in the program ROM 5 or the nonvolatile memory 11 in the same manner as the conventional printer. At this time, the fonts of the font types and character sizes to be prepared as the bit map font are read from the outline font ROM 7a based on the data stored in the non-volatile memory 11, converted into the bit map font and stored preliminarily in the font cache memory 6b (S 102). The processor 4 judges, upon reception of a message by way of the interface 2 relating to the printing instruction from the host unit 20 (S 103), as to whether the font instructed to print by the host unit 20 is previously stored in the font cache memory 6b based on the data of font types and the character sizes received from the host unit 20. (S 104) If the processor 4 decides that the font instructed to print by the host unit 20 is previously stored in the font cache memory 6b, the processor 4 reads the bit map font data from the font cache memory 6b and writes the thus read bit map font data in the image memory 8 (S 105). Accordingly, the printing is carried out with use of the bit map font which is previously stored in the font cache memory 6b. If the processor 4 decides that the font instructed to print by the host unit 20 is not stored in the font cache memory 6b, the processor 4 investigates whether the font memory card 13 is mounted on the printer or not (S 106). If the font memory card 13 is not mounted on the printer, a bit map font generating means generates the bit map font corresponding to the font which is instructed to print by the host unit 20 and writes the thus generated bit map font in the image memory 8 (S 107). Accordingly, the printing is carried out with use of the new generated bit map font. If the font memory card 13 is mounted on the printer, the program goes to S 108, and a decision means decides as to whether the font which is instructed to print by the host unit 20 is stored in the font memory card 13. The decision means searches the presence of the font in concern based on the data of font types and the character sizes (S 108) in the font attribute table provided in the memory space of the font memory card 13. If the first decision means decides that the font types and the character sizes which are instructed to print by the host unit 20 are present in the font memory card 13, the program goes to S 109 where the character attribute table 300 is referred. The processor 4 updates the f n corresponding to the data for frequency of use 220 of the font attribute table 200 (S 110) so as to process the coefficient of the frequency of use if there exists the character codes instructed to print by the host unit 20 in the character attribute table 300 (S 110) and writes the bit map font data corresponding to the font instructed to print by the host unit 20 into the image memory 8 from the bit map area 136 of the font memory card 13 (S 111). Accordingly, the printing is carried out with use of the bit map font stored in the font memory card 13. If the processor 4 decides in S 108 that the font instructed to print by the host unit 20 is not stored in the font memory card 13, the bit map font data generating means generates a new bit map font data based on the information of the printing font supplied by the host unit 20 and writes the thus generated bit map font data in the image memory 8. At the same time, the decision means refers to the flag T in the free block table and decides as to whether the free block table is present or not in the memory space of the font memory card 13 (S 112). The decision means decides the presence of the free block in the following manner in S 112. That is, the decision means retrieves successively the state of flag T n from the highest-order block BK 1 of the free block table 400 to the lower-oder blocks and decides that the block is free if the flag T n is a logical "0" and decides the free block is an area which is used by the font attribute address table 200. The flag T n corresponding to the free block is set to be a logical "1", thereby reserving the free block as the used area. Thereafter, the actual storage area is found by a predetermined calculation, thereby storing the data corresponding to the font attribute table 200 in the actual storage area. If the processor 4 decides that the free block is not present in the memory space of the font memory card 13 in the Step 112, the processor 4 refers to the font managing table of the working memory and decides as to whether the free area is present in the font cache memory 6b or not (S 113). If so, the new generated bit map font data is written in the free area (S 114) and it writes the same bit map font data in the image memory 8 (S 115). If the processor 4 decides that the free block table is present in the memory space of the font memory card 113 in the Step 112, the processor 4 retrieves the free block from a free block table inspecting the state of the flag T therein and reserves the retrieved free block (S 116). The processor 4 stores the data of the font types and the character sizes which are instructed to print by the host unit 20 in the free block reserved in the font attribute table 200. The processor 4 stores e.g. the logical "0" as an initial value in other items of the font attribute table 200 (S 117). Thereafter, the processor 4 prepares data for each item of the character attribute address table 300 based on character data instructed to print by the host unit 20 and investigates the presence of a free block for storing the prepared data in each item of the character attribute address table 300 (S 118). The retrieval is carried out in the same manner as made in the Step 112, namely, by successively investigating the state of the flag T m from the highest order block BK 1 to the lower order block of the block table 400 as shown in Fig. 6. When the processor 4 retrieves the free block, it sets the flag T m corresponding to the free block to the logical "1" and reserves the character attribute address table area (S 119). The processor 4 writes SAD data and EAD data in the font attribute table after reserving the character attribute address table area (S 120). Successively, the processor 4 retrieves a free area again in the free block table 300 by investigating the state of the flag T m (S 121). If the free block is present, the processor 4 writes BSAD and BQ in the character attribute address table in the free block and stores the new generated bit map font data in the bit map font data block 512 corresponding to the bit map font area (S 122) and at the same time writes the same new generated bit map font data in the image memory 8 (S 123). If the processor 4 decides in the Step 109 that the bit map font data of the character code which is instructed to print by the host unit 20 is not present in the character attribute table 300, the program goes to Step 118 where the processor 4 decides as to whether the free block is present in the memory space of the font memory card 13 by referring to the flag T. If there is the free block, the program goes to Step 119 where the processor 4 stores the new generated bit map font into the free block table (S 112) and at the same time writes the new bit map font data in the image memory 8 (S 123). If the processor 4 decides that the space area is not present in the font memory card 13 and in the font cache memory 6b by the judgement up to the Step 113, the processor 4 retrieves the font having the lowest frequency of use in the font memory card 13 from the f's representing the frequency of use of the fonts in the font attribute table 200. The processor 4 erases the bit map font data and each item of the character attribute table 300 and the font attribute table 200 of the selected font having the lowest frequency of use and reserves the space area in the memory space of the font memory card 13 (S 125). Then, the program goes to Step 120 where the processor 4 stores each item data of the newly generated bit map font data character attribute table 300 and font attribute table 200 into the reserved free area whereby the newly generated bit map font data is stored in the memory space of the font memory card 13 (S 122). As illustrated in the arrows in Fig. 3, the data in the character attribute table 300 and the font attribute table 200 is stored from the starting address successively toward higher address whereas the bit map data is stored from the highest address of the bit map font area 136 toward the lower address.

Claims: A printer provided with a font memory card (13) detachably connected to the printer ; comprising: a font ROM (7a) storing therein first font data; a font data generating means (4) for generating second font data for printing based on the data stored in the font ROM (7a); a means (200) for storing the frequency of use of the fonts of font types and character sizes; characterized in that said font ROM (7a) is an outline font ROM and said first font data represents outlines of printing characters and control parameters for generating said second font data; said second font data generated by said font data generating means (4) is bit map font data; and in that it further comprises: a bit map font data storage means (136) for storing the thus generated bit map font data in the font memory card (13); and a means (4) for storing the thus generated bit map font data in the font memory card in the order of priority of the frequency of use thereof. A printer provided with font memory card according to Claim 1 further comprising: a first decision means for deciding as to whether a font designated by an upper unit is previously stored in a font cache memory (6b) of the printer; a second decision means for deciding as to whether a font designated by an upper unit has been already stored in the font memory card (13); characterized in that the bit map font data designated by the upper unit (20) is written in an image memory (8) when the first decision means decides that the designated font is stored in the font cache memory (6b) or the second decision means decides that the designated font is stored in the font memory card (13). A printer provided with a font memory card (13) according to Claim 1 further comprising: a first decision means for deciding as to whether a font designated by an upper unit (20) has been already stored in a font cache memory (6b) of the printer; a second decision means for deciding as to whether a font designated by an upper unit (20) is previously stored in the font memory card (13); wherein the bit map font data having the least frequency of use among those stored in the font memory card (13) is erased to reserve a free memory area and a new generated bit map font data is stored in the free memory area (135) reserved in the font memory card (13) when the first decision means decides that the designated font is not stored in the font cache memory (6b) and the second decision means decides that the designated font is not stored in the font memory card (13). A printer provided with a font data memory card (13) according to Claim 1, wherein the font data memory card (13) detachably connected to the printer is a non-volatile memory card. A printer provided with a font data memory card (13) according to Claim 1, wherein the font data memory card (13) detachably connected to the printer is characterized in comprising: a font attribute address table (200) for storing therein and managing a frequency of use data corresponding to font types (TF) and character sizes (SZ), a starting address (SAD) of a character attribute address table (300) and an ending address (EAD) of the character attribute address table (300); and the character attribute address table (300) representing storage addresses of bit map fonts corresponding to character codes (CD) of fonts designated by combinations of font types (TF) and character codes (CD). A method of operating a printer provided with a detachable font memory card for printing in a selectable font comprising the steps of: maintaining first font data in a font ROM (7a); generating second font data based on said first font data; storing said second font data; storing data to represent the frequency of use of font types and font sizes that have actually been selected for printing; printing in a selected font using the second font data; characterized in that said font ROM (7a) is an outline font ROM and said first font data represents outlines of printing characters and control parameters for generating said second font data; said second font data is bit map font data and in that said bit map font data is stored in the order of priority of the frequency of use in said detachable font memory card. The method of claim 6 further comprising organizing the bit map font data in accordance with the frequency of use data. The method of claim 7 further comprising deleting stored data corresponding to the least frequently used font as indicated by said frequency of use data. The method of claim 8 wherein said deleting step occurs in response to specifying new data.

Inventors: NAGATA MASATO, NAGATA, MASATO, Nagata, Masato, c/o Oki Electric Ind. Co. Ltd.
Applicants: OKI ELECTRIC IND CO LTD, OKI ELECTRIC INDUSTRY COMPANY, LIMITED
Application year: 1991
Main classification: G06K15
IPC codes: G06K15, G09G5, B41J5, B41J29, B41J2