Character processing in a window system

Abstract: According to the character processing method, a character pattern is output to a printer in a window system which manages a printer driver and processes a plurality of tasks in parallel. The method includes steps of receiving a character output request from each task, and transferring the character pattern to be outputted from the window system to the printer in the form of an image or code in response to the request.

Description: BACKGROUND OF THE INVENTION This invention relates to a character processing method in a window system. A window system usually has a display unit and a printer as input/output units. In order to reduce the dependence of the window system upon the hardware (especially the printer), a printer driver which acts as an intermediary between the connected printer and the window system is provided within the system or external thereto. In the conventional window system, the output devices have their own character data. That is, the character data possessed by the printer is exclusively for the printer, and the character data displayed on the display is exclusively for the display. Further, information indicating which fonts are usable by the printer is either imbedded in the aforesaid printer driver or registered beforehand in a hard disk or the like. However, the prior art described above has the following drawbacks: (1) It is necessary to provide font data on both the display and printer sides irrespective of the fact that the same characters are outputted to the display and printer sides. This places a heavy burden upon the user. Though a method is available in which fonts are developed on the host side and delivered to the printer in a case where the printer does not possess fonts, this method takes possession of the CPU on the host side, as a result of which user waiting time is lengthened and operating efficiency declines. (2) Even if a ROM cartridge of optional fonts is loaded in the printer, the fonts are not used effectively. Since the fonts are always developed into an image on the host side at the time of output, the CPU on the host side is occupied at such time, user waiting time is lengthened and operating efficiency declines. Even if the user possesses the font data, it cannot be utilized. EP-A-0356104 discloses a document processing system in which a font server is connected to a plurality of workstations and to a printer. When the printer is required to print a document, the printer first checks whether or not a particular font is present in its font cache and, if not, sends a signal to the font server requesting the font and designating the style of each letter required within the font, the size of the letter and the shape of the letter. The requested letter data for the font is transmitted by the font server to the printer which can then output the letter using the required font and at the same time store that letter data in the font cache in case it is required again. SUMMARY OF THE INVENTION According to a first aspect of the present invention, there is provided a character processing apparatus comprising download means for downloading a font to a printer, characterized by: first generation means for generating a printer font table storing font information including a font name and a data format regarding a font usable in the printer; second generation means for generating a computer font table storing font information including a font name and a data format regarding a font usable in a computer; and selection means for selecting a font, which is imbedded in the computer and not imbedded in the printer, having the data format usable by the printer, referring to the printer font table and the computer font table, wherein said download means downloads the font selected by said selection means to the printer. According to a second aspect of the present invention, there is provided a character processing method comprising a downloading step of downloading a font to a printer, characterized in the steps of: generating a printer font table storing font information including a font name and a data format regarding a font usable in the printer; generating a computer font table storing font information including a font name and a data format regarding a font usable in a computer; and selecting a font, which is imbedded in the computer and not imbedded in the printer, having the data format usable by the printer, referring the printer font table and the computer font table, and downloading the font selected in said selecting step to the printer. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram showing the basic construction of a character processing system according to the embodiments of the present invention; Fig. 2 is a memory map of a RAM used in the system of Fig. 1; Fig. 3 is a diagram showing the overall flow of processing in the character processing system of the embodiments; Fig. 4 is a flowchart showing the flow of a procedure in a window system and in an application program; Fig. 5 is a diagram showing a font table of a printer driver; Fig. 6 is a diagram showing a font table of a font driver; Fig. 7 is a diagram showing the names of fonts sent back to an application program; Figs. 8A, 8B, 9A, 9B, 10A and 10B are diagrams showing examples in which characters inputted by an application program are displayed on a CRT and outputted to a printer; Fig. 11 is a flowchart showing a control procedure of the window system according to a first embodiment; Fig. 12 is a flowchart showing a control procedure of the window system for a case where a judgment concerning a cartridge is added to control in a second embodiment; Fig. 13 is a diagram showing a font table of a printer driver used in the second embodiment; Fig. 14 is a flowchart showing a control procedure of the window system in a case where judgment concerning downloading is added to control in a third embodiment; Fig. 15 is a flowchart showing a control procedure of printer driver in a case where cartridge determination and a downloading determination are performed in a printer driver; Fig. 16 is a flowchart showing a control procedure of a window system according to a fourth embodiment; Fig. 17 is a flowchart showing a control procedure of a font driver according to the fourth embodiment; Fig. 18 is a diagram showing the flow of data in font downloading according to the fourth embodiment; Fig. 19 is a diagram showing the initial state of a font table in a printer driver according to the fourth embodiment; Figs. 20A and 20B are diagrams showing a change in the font table of the printer driver according to the fourth embodiment; Fig. 21 is a diagram showing a font table in a font driver used in the fourth embodiment; and Fig. 22 is a diagram showing the flow of data in downloading in the fourth embodiment. DESCRIPTION OF THE PREFERRED EMBODIMENTS First through fourth embodiments of the present invention will now be described with reference to the accompanying drawings. <System Configuration> Fig. 1 is a block diagram showing the basic construction of a Japanese-language character processing system to which the present invention is applied. The configuration of the blocks is the same for the first through fourth embodiments. If the system is a character processing system, it may be an English word processor or a work station or a computer system having a character processing function. The system shown in Fig. 1 includes a CPU (central processing unit) 10 for controlling the overall system and executing various processing, and a ROM (read-only memory) 102, which is a storage area for a system start-up program, character pattern data and the like, wherein the character pattern data usually is used as the system fonts and it utilized is displaying the characters of a menu or the like. The fonts used as the system fonts are stored in the ROM 102 and may be font data which cannot be designated or changed (such as Ming-style fonts having a 16-dot bit-map format) or fonts that the user has designated in advance. The system further includes a RAM (random-access memory) 3 having a storage area for data of unlimited use. Programs represented by flowcharts, described below, corresponding to a variety of processing, as well as data, are loaded in the storage area of RAM 103. Fig. 2 illustrates the details of the memory map of RAM 103. In Fig. 2, numeral 201 denotes a system area in which a window system 301 is loaded, 202 a work area, and 203 a system management area. Management information such as a printer-driver font table shown in Fig. 5 and a font-driver font table shown in Fig. 6 is stored in the management area 203. The printer-driver font table stores information regarding fonts usable in a printer driver, described below, and the font-driver font table stores information regarding fonts usable in a font driver. With reference again to Fig. 1, numeral 104 denotes a KBC (keyboard controller) for accepting key input data from a keyboard (KB) 105 and transmitting the data to the CPU 101. Also provided are a CRTC (display controller) 106 for receiving data from the CRTC 106 and displaying the data. Numeral 109 designates external memory devices such as an FD (floppy disk) or HD (hard disk) in which programs and data are stored in advance. When processing is executed, the programs and data are referred and loaded in the RAM 103 as necessary. There are also provided a PRTC (printer controller) 110 and a PRT (printer) 111. Numeral 112 denotes an optical ROM cartridge, in which font data is stored internally. The internal font data is delivered to the printer 111. The system of Fig. 1 is further provided with a sensor (not shown) which detects the absence or presence of the cartridge 112. Whether or not the cartridge 112 is present may be determined by accessing an address of the cartridge ROM 112 by means of software. Numeral 113 designates a system bus forming a data path connecting the foregoing components. <Basic Operation of Window System> Fig. 3 illustrates the configuration of the window system, and Fig. 4 illustrates the flow of a procedure until there is a character-output request from an application program. In Fig. 3, numeral 301 denotes a window system (which may include an OS). The system is loaded in the RAM 103 of Fig. 1 and is started up by the CPU 101. Application programs A and B are user programs. The window system 301 of Fig. 3 is provided with seven items of driver software that are capable of being interfaced. The items of driver software mentioned here are programs for accommodating the hardware peculiarities of the hardware (e.g., printers and CRT) connected to these items of software so that these items of hardware may be connected to the window system 301. The function of the software is to reduce the dependence of the window system 301 upon the hardware. The drivers which are most closely associated with the present invention are print drivers (302, 303) and font drivers (307, 308). The printer 111 is a page printer which accepts prescribed commands, forms print images and prints out the images page by page in accordance with the commands. The printer drivers serve to interface the system 301 with the printer 111 and are capable of interfacing the printer independently. In particular, the printer drivers in the embodiments described below send character codes in the form of a draw command. The printer 111 interprets this command forms an image corresponding to the particular character and prints the image. The font drivers mainly generate the fonts of characters outputted to a display screen. In terms of usage, they generate an image corresponding to a character in a case where the corresponding font is not present on the printer side. In Figs. 3 and 4, the window system (which may include an OS)is loaded in the RAM 103 of Fig. 1 and is started up by the CPU 101. When the window system 301 is started up, the various drivers (302, 303, 304, 305, 306, 307, 308 in Fig. 3) are loaded in the RAM 103 at step 401 (Fig. 4). Then, at step 402, the printer drivers (302, 303) and font drivers (307, 308) are sent requests for information regarding the kinds of fonts capable of being used in these drivers. This is followed by step 403, at which the system 301 generates font tables, of the kind shown in Figs. 5 and 6, in the RAM 103 based upon this information. According to the examples of Figs. 5 and 6, the present system currently is such that Ming-style and square-style fonts are capable of being used in printer driver A, Gothic-style and brush-style fonts in the printer driver B, Ming-style and round Gothic-style fonts in font driver A and only the round Gothic-style in font driver B. Next, at step 404, a request to display an initial screen in a window is sent to the display driver 304. The window system 301 then attains a state at step 405 in which it waits for various events from the input device 105, such as the keyboard or mouse. When informed at step 405 of the occurrence of a start-up event regarding the application program, the window system loads and starts up the application program (309, 310, etc.), which is the cause of the event, at step 406 and then waits for an event again. The application program that has been started up issues an initial-screen display request to the window system at step 407 and then makes an inquiry at step 408 regarding information (font information) concerning the fonts that can be used by the system. The user is notified of the acquired font information, namely the information regarding which fonts are usable, at step 409. In the character input routine of step 410, a character code used by the user is designated by the user. Then, at step 411, the character code inputted at step 410, as well as the designated font name, size and output device, etc., is delivered to the window system along with a character-output request. The window system 301 executes the processing of step 405 with this character-output request serving as an event, and then places it in an application-program cueue at step 406. When this is done, the inputted character is displayed and outputted. Fig. 7 is a list of the names of font which, as a result of step 408, the application program allows the user to use. This list may be displayed on the CRT 107. The user utilizes a font upon selecting it from this font list. Reference will now be had to Figs. 8A through 10B to describe the kinds of problems that arise when a font designated by the user does not agree with a font usable on the side of the host system or on the side of the printer 111. <Character Output Example 1> Fig. 8A illustrates the appearance of a display presented on the CRT 107 when the user inputs a character string upon selecting the round Gothic font A. As shown in Fig. 8A, several Japanese-language hiragana characters are displayed within a window 801. Fig. 8B illustrates the result of outputting the characters, which have been inputted in the window 801 of Fig. 8A, to the printer 111. It is assumed here that the user has designated the round Gothic font A. Though the round Gothic font has been registered as a usable font in the font table of the font driver (Fig. 6), it has not been registered in the printer driver (Fig. 5). In other words, this means that the round Gothic font A is usable in the system but is not usable in the printer 111. Consequently, the characters are displayed in the round Gothic font in window 801, but the output to the printer 111 is performed by transferring the data bit-map developed in the font driver A (307) to the printer 111 via the printer driver A (302) and outputting this data. As a result, though WYSIWYG ("what you see is what you get") is capable of being realized on the side of the host system, the processing for bit-map development and the transfer of the bit-map data to the printer are carried out under the control of the host (CPU 101). This means that a very long period of time is required before the host becomes free again. <Output Example 2> Fig. 9A illustrates the manner in which a window 901 is displayed on the CRT 107 when the user inputs a character string upon selecting the block-style font A. Fig. 9B illustrates the result of outputting the inputted characters to the printer 111. Though the block-style font A has been registered in the font table of the printer driver (Fig. 5), it has not been registered in the font driver (Fig. 6). In other words, this means that the block-style font A does not exist on the host side. Accordingly, the system font is utilized for the output to the CRT 107. In the example of Fig. 9A, the round Gothic-style font A has been set as the system font, and therefore the inputted characters are displayed in the form of the round Gothic font. On the other hand, the output to the printer is transferred to the printer 107, via the printer driver A (302), as a group of commands capable of being analyzed by the printer 107, and printing is performed by means of the block-style font. Though the host is released sooner because the data transfer takes a short time owing to the command transfer, WYSIWYG cannot be realized on the side of the host system. <Character Output Example 3> Fig. 10A illustrates the appearance of the display when the user inputs a character string upon selecting the Ming-style font A. Fig. 9B illustrates the result of outputting the characters to the printer 111 after input. The Ming-style font A has been registered in both the font driver (Fig. 6) and the printer driver (Fig. 5). As a result, the font driver A (307) is used for the output to the CRT 107, whereas the output to the printer 111 is transferred to the printer 111 via the printer driver A (302) in the form of a printer control command so that the print-out is made in the form of the Ming-style font. Only a short time is needed for the data transfer owing to the command transfer, and operating efficiency is raised since the host is released in a shorter period of time. <First Embodiment> The basic operation of the window system has been described with reference to Figs. 3 and 4, and operation in terms of the displayed screens as seen by the user has been illustrated with reference to Figs. 8 through 10. Next, the operation of the first embodiment will be described in detail using the flowchart of Fig. 11. When the window system 301 is started up, the system 301 inquires at step 1101 as to the fonts that have been registered in the printer drivers (302, 303). In this embodiment, the font information (font name, data format, etc.) of the kind shown in Fig. 5 is imbedded in the printer drivers (302, 303) themselves, and therefore the printer drivers send this information to the system 301 in response to the inquiry. It should be noted that the font table may be stored in the hard disk 109. Next, at step 1102, and based upon the acquired font information, the window system 301 creates a printer-driver font table, of the kind shown in Fig. 5, in the RAM 103. This is followed by step 1103, at which each font driver (307, 308) is requested for information regarding the font usable thereby. After this information is acquired, the table illustrated in Fig. 6 is created at step 1104. As in the case of the printer driver, the font information of the font driver is imbedded in the font driver itself. However, this may be stored in the hard disk 109. In order to realize WYSIWYG, it is necessary that the names of the fonts registered in a font driver use the same names as those of the fonts registered in a printer driver. In response to the font-information request (at step 408 in Fig. 4) from the side of the application program, the font information created at steps 1102, 1104 is sent to the application program at step 1105. A character-output request from the application program is then received at step 1106. This request is made at step 411 in Fig. 4. At step 411, a flag indicating whether an output to the printer (which output includes output-printer designating information) or an output to the display 107 is to be performed, as well as information such as font name, size and embellishment, etc., is delivered as a parameter from the application program to the system 301. Next, at step 1107, the system 301 determines whether the designated destination for the output is the printer. If the answer is YES, then the program proceeds to step 1113; otherwise (i.e., when the destination is the CRT), the program proceeds to step 1108. When output destination is the CRT At step 1108, it is determined whether the font table (Fig. 6) of the font driver (307 or 308) contains the font name requested by the application program and acquired at step 1106. If the table does contain the font name, then the program proceeds to step 1109, at which it is requested that the font driver (307 or 308) containing the font develop, into a bit map, the characters whose output is requested by the application program. The developed result is displayed on the display 107 via the display driver 304 at step 1111. Figs. 8A and 10A correspond to this display. If it is found at step 1108 that the font driver does not contain the font name, then the program proceeds to step 1110. This means that the font designated by the user cannot be used in the system and that the system font must be used instead. Therefore, at step 1110, the system font is enlarged or reduced to the size requested by the application program, and the result is displayed on the display device via the CRT driver 304 at step 1111. The size requested by the application program is obtained from the application program at step 1106. This display corresponds to Fig. 9A. When output destination is the printer The procedure from step 1112 onward is processing executed when the output is to the printer. It is determined at step 1112 whether the printer driver (302 or 303) contains the font name designated from the application program at step 1106. If the answer is YES, the program proceeds to step 1113; otherwise, the program proceeds to step 1115. If the printer driver is capable of handling the designated font, a command conversion corresponding to the printer 111 is performed at step 1113 and the code (command) is transferred to the printer 111 at step 1114. The printer 111 performs print-out and processing is terminated. In the preceding example, Figs. 9B and 10B correspond to this print-out. The command conversion referred to at step 1113 involves converting a system-specific code (command) outputted by the window system 301 into a code (this may be a code described in a language such as PDL, or data) capable of being handled by the designated printer. In a case where the font designated by the application program does not exist in the printer driver, i.e., if the printer 111 is incapable of processing the designated font, the program proceeds from step 1112 to step 1115. At step 1115, the font driver capable of handling the designated font is requested to develop the font into a bit-map format. Then, at step 1116, the image in the bit-map format is transferred to the printer 111 via this printer driver. Here the image is printed out and processing is terminated. <Second Embodiment> In the first embodiment set forth above, a detailed description has been given of a character processing method having a function for creating font tables upon interrogating printer and font drivers concerning their fonts, and a function for determining, based upon the tables, whether a font identical with a font designated by the application program (the user) is capable of being processed by the printer and display. The second embodiment relates to a processing method for the case where the optional font cartridge 112 is set in the printer 111. This embodiment will be described in detail with reference to the flowchart of Fig. 12. By setting the optional font cartridge 112 in the printer 111 in this embodiment, the number of fonts capable of being handled in the printer 111 is increased. In the second embodiment, the printer-driver font table (see Fig. 13) is altered by loading the cartridge 112, but the font-driver font table used is the same as that of the first embodiment. When the window system 301 is started up, the system 301 interrogates the printer drivers (302, 303) at step 1201 concerning the fonts that have been registered in these drivers. Each printer driver responds by sending the font information (font name, data format, etc.) to the system 301. The font information may be stored in the hard disk 109 or imbedded in the printer drivers themselves. Next, at step 1202, it is determined whether the ROM cartridge 112 has been loaded in the printer 111. If the cartridge has been loaded, then the information regarding the fonts stored in the cartridge 112 is acquired at step 1203, after which the program proceeds to step 1204. Thus, the system 301 comes to possess the font information obtained at steps 1201 and 1203. Next, at step 1204, and based upon the acquired font information, the window system 301 creates a printer-driver font table, of the kind shown in Fig. 13, in the RAM 103. The table includes information indicative of storage location. This is followed by step 1205, at which each font driver (307, 308) is requested for font information (font name, data format, etc.). After this information is acquired, the table illustrated in Fig. 6 is created at step 1206. In the second embodiment also, the font information of the font driver may be stored in the hard disk 109 or imbedded in the font driver itself, just as in the case of the printer driver. In order to realize WYSIWYG, it is necessary that the names of the fonts registered in the font driver use the same names as those of the fonts registered in a printer driver. In response to the font-information request (at step 408 in Fig. 4), the font information in the tables shown in Figs. 13 and 6 is delivered to the application program at step 1207. A character-output request from the application program is then received at step 1208 (step 411 in Fig. 4). At this time, a flag indicating whether an output to the printer or an output to the display is to be performed, as well as information such as font name, size, embellishment and output-printer designating information, etc., is delivered as a parameter from the application program. Next, at step 1209, the system 301 determines whether the designated destination for the output is the printer. If the answer is YES, then the program proceeds to step 1210; otherwise, the program proceeds to step 1218. When output destination is the display At step 1218, it is determined whether the font table (Fig. 16) of the font driver (307 or 308) contains the font name acquired at step 1208. If the table does contain the font name, then the program proceeds to step 1219, at which it is requested that the font driver (307 or 308) containing the font develop, into a bit map, the characters expressed by the font requested by the application program. The developed result is displayed on the display via the display driver 304 at step 1221. If it is found at step 1218 that the font driver does not contain the font name, then the program proceeds to step 1426. Here the system font is enlarged or reduced to the requested size. The result is displayed on the display device via the display driver 304 at step 1221. When output destination is the printer Step 1210 is processing executed when the output is to the printer. It is determined at step 1210 whether the printer driver (302 or 303) contains the font name requested at step 1208. If the answer is YES, the program proceeds to step 1211; otherwise, the program proceeds to step 1216. At step 1211, a determination as to whether the font designated by the application program is one that is contained in the ROM cartridge 112 is made using the information regarding storage location illustrated in Fig. 13. If it is contained in the ROM cartridge, the program proceeds to step 1212; otherwise, the program proceeds to step 1214. It is determined at step 1212 whether the ROM cartridge 112 has been loaded. It the cartridge has been, loaded, the program proceeds to step 1213; otherwise, an error message is displayed and processing is terminated. It is determined at step 1213 whether the name of the font in the loaded ROM cartridge is identical with the designated font name. If it is identical, then the program proceeds to step 1214; otherwise, an error message is displayed and processing is terminated. Next, at step 1214, a code conversion corresponding to the printer is carried out by the printer driver designated at step 1210, the code is transferred to the printer and printed out at step 1215, and processing is terminated. In the previous example, Figs. 9B and 10B correspond to this print-out. The code conversion referred to here involves converting a system-specific code outputted by the window system into a code capable of being handled by the designated printer. Step 1216 is processing for a case where the font is not present in the printer. Here the font driver in which the font is present is requested to develop the font into a bit-map format. Then, at step 1217, the image is transferred to the printer via this printer driver. Here the image is printed out and processing is terminated. <Third Embodiment> In the first and second embodiments set forth above, a detailed description is given of character processing methods in which inquiries concerning fonts are made, it is determined whether the printer and display have identical fonts, and it is determined whether a font cartridge has been loaded or not. In the third embodiment below, a processing method for a case in which the printer has a downloading function will be described in detail with reference to the flowchart of Fig. 14. When the window system is started up, the system 301 interrogates the printer drivers (302, 303) at step 1401 concerning the fonts that have been registered in these drivers. Each printer driver responds by sending the font information (font name, data format, etc.) to the system 301. The font information may be stored in the hard disk 109 or imbedded in the printer drivers themselves. Next, at step 1402, it is determined whether the ROM cartridge 112 has been loaded in the printer. If the cartridge has been loaded, then the information regarding the fonts stored in the cartridge 112 is acquired at step 1403, after which the program proceeds to step 1404. Here, based upon the acquired font information, the window system 301 creates a printer-driver font table, of the kind shown in Fig. 13, in the RAM 103. The table includes information indicative of storage location. This is followed by step 1405, at which each font driver (307, 308) is requested for font information. After this information is acquired, the table illustrated in Fig. 6 is created at step 1406. The font information of the font driver may be stored in the hard disk 109 or imbedded in the font driver itself, just as in the case of the printer driver. In order to realize WYSIWYG, it is necessary that the names of the fonts registered in the font driver use the same names as those of the fonts registered in a printer driver. Next, at step 1407, it is determined whether downloading to each printer driver is possible. If downloading is possible, the program proceeds to step 1408; otherwise, the program proceeds to step 1412. At step 1408, the two font tables of Figs. 13 and 6 are compared and fonts registered as usable in the font driver but not registered in the printer drivers (302, 303) are selected. If even one such font exists, the program proceeds to step 1409; otherwise, the program proceeds to step 1412. At step 1409, the font having the data format presently designated and usable by the printer is selected from among the fonts selected at step 1408. If even one font having a usable data format exists, the program proceeds to step 1410; otherwise, the program proceeds to step 1412. Step 1410 calls for the font selected at step 1409 to be downloaded to the printer 111 via the printer drivers (302, 303). Next, at step 1411, the downloaded font is added to and registered in the printer-driver font table (Fig. 5). It is then determined at step 1412 whether all printer drivers have been confirmed. If the answer is YES, then the program proceeds to step 1413. If the answer is NO, then processing from step 1407 onward is repeated. In response to the font-information request (at step 408 in Fig. 4) from the application program, the font information in the tables shown in Figs. 6 and 13 is delivered to the application program at step 1413. A character-output request from the application program is then received at step 1414. At this time, a flag indicating whether an output to the printer or an output to the display is to be performed, as well as information such as font name, size, embellishment and output-printer designating information, etc., is delivered as a parameter from the application program (step 411 in Fig. 4). Next, at step 1415, the system 301 determines whether the designated destination for the output is the printer. If the answer is YES, then the program proceeds to step 1416; otherwise, the program proceeds to step 1424. When output destination is the display At step 1224, it is determined whether the font table (Fig. 16) of the font driver (307 or 308) contains the font name acquired at step 1414. If the table does contain the font name, then the program proceeds to step 1425, at which it is requested that the font driver (307 or 308) containing the font develop, into a bit map, the characters expressed by the font requested by the application program. The developed result is displayed on the display via the display driver 304 at step 1421. If it is found at step 1424 that the font driver does not contain the font name, then the program proceeds to step 1426. Here the system font is enlarged or reduced to the requested size. The result is displayed on the display device via the display driver 304 at step 1472. When output destination is the printer Step 1416 is processing executed when the output is to the printer. It is determined at step 1416 whether the printer driver (302 or 303) contains the font name requested at step 1414. If the answer is YES, the program proceeds to step 1417; otherwise, the program proceeds to step 1422. At step 1417, a determination as to whether the designated font is one stored in the ROM cartridge 112 is made using the storage-location information of the printer-driver font table (Fig. 13). If it has been stored in the ROM cartridge, the program proceeds to step 1418; otherwise, the program proceeds to step 1420. It is determined at step 1418 whether the requested ROM cartridge 112 has been loaded. It the cartridge has been loaded, the program proceeds to step 1419; otherwise, an error message is displayed and processing is terminated. It is determined at step 1419 whether the name of the font stored in the loaded ROM cartridge is identical with that requested by the application program. If it is identical, then the program proceeds to step 1420; otherwise, an error message is displayed and processing is terminated. Next, at step 1420, a code conversion corresponding to the printer is carried out by the designated printer driver, the converted code is transferred to the printer and printed out at step 1421, and processing is terminated. In the previous example, Figs. 9B and 10B correspond to this print-out. The code conversion referred to here involves converting a system-specific code outputted by the window system into a code capable of being handled by the designated printer. Step 1422 is processing for a case where the font is not present in the printer. Here the font driver in which the font is present is requested to develop the font into a bit-map format. Then, at step 1423, the image is transferred to the printer via this printer driver. Here the image is printed out and processing is terminated. Fourth Embodiment In the embodiments set forth thus far, arrangements are described in which the window system determines whether the cartridge has been loaded and whether downloading is possible. The fourth embodiment is one in which these processing operations are performed by the drivers. Fig. 15 is a flowchart showing the control procedure of the printer driver, Fig. 16 is a flowchart showing the control procedure of the system 301, and Fig. 17 is a flowchart showing the control procedure of the font driver. According to downloading in the fourth embodiment, the printer driver takes the initiative and, if the font requested by the application program of the user has not been registered in the printer-driver font table, i.e., if the font is not usable in the printer 111, loads the font data from the font driver to the RAM of the printer 111. The parallel operation of the printer driver, window system and font driver in downloading according to the fourth embodiment will be described with reference to Figs. 15, 16 and 17. When the system 301 is started up, the printer driver and font driver are started up and these are interrogated with regard to the fonts that have been registered in their respective font tables. At step 1501, the started printer driver loads the font information stored in the hard disk 109 in the RAM 103 (work area 202 in Fig. 2). At this point in time, the fonts that have been registered in the printer driver are assumed to be of four types, as illustrated in Fig. 19. Next, it is determined at step 1502 whether the printer 111 has been connected. If the connected has been connected, the program proceeds to step 1503; otherwise, the system generates an error and proceeds to step 1516. It is determined at step 1503 whether the printer is in a usable state (i.e., active). If the printer is usable, the program proceeds to step 1504; otherwise, the system generates an error and proceeds to step 1516. It is determined at step 1504 whether the ROM cartridge 112 has been loaded. If it has, the program proceeds to step 1506; otherwise, the program proceeds to step 1508. Information regarding the fonts stored in the cartridge 112 is read out of the cartridge at step 1506. It is assumed here that round Gothic-style fonts have been stored in the cartridge 112. The read font information is added to the font table in RAM 103 at step 1507, after which the program proceeds to step 1508. The font table at this time has information of the kind shown in Fig. 20A stored in the RAM 103. At step 1508, the font information in RAM 103 is transferred to the system 301. At step 1601, the system 301 interrogates each printer driver with regard to their font information. At step 1602 in Fig. 16, the system 301 updates the font table based upon the new font information received from the printer driver at step 1601. The printer-driver font table is updated to the table of Fig. 20B owing to this updating operation. At step 1603, the window system 301 interrogates the font driver regarding the usable fonts, just as in the case of the printer driver. When the font driver (307 or 308) is started up from the system, the font-driver font information stored previously in the hard disk 109 is loaded in the RAM 103 (area 203 in Fig. 2) at step 1701. Next, at step 1702, the font information is transferred to the window system 301 in response to the inquiry (step 1603) from the system. A request from the system is awaited at step 1703. When font information from the font driver is received, the font-driver font table is updated at step 1604 on the side of system 301. At this point in time, the font usable in the font driver is assumed to be a font X not in the printer driver, as illustrated in Fig. 21. At step 1605, the system waits for notification as to whether downloading is to be carried out from the printer driver. At step 1509, the printer driver determines whether the connected printer 111 is capable of downloading. If the answer is YES, then the program proceeds to step 1510; if NO (e.g., if a RAM area that is to receive the new font has not been obtained in the printer), then the program proceeds to step 1518. If downloading is not possible, the system is notified at step 1518 of the fact that downloading will not be carried out (step 1606 in Fig. 16) and the program proceeds to step 1516. When downloading is possible, the program proceeds to step 1510 and font downloading is performed. When the system 301 is notified by the printer driver of the fact that downloading will not be performed, the program proceeds to step 1609 in Fig. 16. Here the font information is sent to the application program, whereby the application program is informed of the fonts usable in the printer 111. If downloading can be carried out, on the other hand, then downloading is performed at steps 160 ∼ 1705, after which the program proceeds to step 1609. Here the application program is informed of all fonts usable by the printer 111, inclusive of downloaded fonts. Font downloading according to the fourth embodiment will now be described. First, at step 1510, the system 301 is requested by the printer-driver side for font information that has been stored in the font driver. Upon receiving this request, the system 301 delivers the font-driver font table to the side of the printer driver at step 1606. A request of font data from the printer driver is awaited at step 1617. On the side of the printer driver, the font-driver font information acquired at step 1510 and the printer-driver font information are compared and it is determined whether fonts registered as usable in the font driver but not registered in the printer driver exist. If there is not even one such font, downloading is not executed the program proceeds to step 1516, where the system is informed of suspension of downloading. On the other hand, if there is even one font registered as usable in the font driver but not registered in the printer driver, the program proceeds to step 1512; otherwise, the program proceeds to step 1516. At step 1512, a font whose data format is identical with that of the printer driver is selected from the one or plurality of fonts selected at step 1511. If even one font having the same format exists in the font driver, the program proceeds to step 1513; otherwise, the program proceeds to step 1516. A request for the font data selected at step 1512 is sent to the system 301 at step 1513. Upon receiving this request at step 1607 (Fig. 16), the system 301 requests this font data from the font driver possessing it. Upon receiving this request at step 1703, the printer-driver side determines at step 1704 that this request is a request for font data. The requested font data is sent to the system 301 at step 1705. Upon receiving the font data at step 1608, the system 301 transfers this font data to the printer driver. The printer driver receives the transferred font data at step 1513 and downloads the data to the printer 111 at step 1514. The printer-driver font table is updated at step 1515. As a result, the font table reflects the fact that the font X is now usable. Upon the completion of downloading, the system 301, at step 1609, sends the application program the information regarding all fonts (inclusive of downloaded fonts and fonts stored in the cartridge) usable in the printer 111. The application program which has received this font information at step 408 executes steps 409 and 410 and sends the system 301 a character-output request at step 411. At step 1610, the system 301 receives this request, along with a flag indicating whether an output to the printer or an output to the display is to be performed, as well as information such as font name, size, embellishment and output-printer designating information, from the application program. Next, at step 1611, the system 301 determines whether the designated destination for the output is the printer. If the answer is YES, then the program proceeds to step 1612; otherwise, the program proceeds to step 1617. On the other hand, the printer driver repeats a procedure in which processing in executed in response to a request from the system 301 in the loop consisting of steps 1516 → 1517 → 1516. Further, the font driver also repeats a procedure in which processing in executed in response to a request from the system 301 in the loop consisting of steps 1703 → 1704 → 1706 → 1703. When output destination is the display At step 1617, the system 301 determines whether the font table (Fig. 6) of the font driver (307 or 308) contains the font name requested by the application program at step 1610. If the table does contain the font name, then the program proceeds to step 1618, at which it is requested that the font driver (307 or 308) containing the font develop, into a bit map, the characters expressed by the font requested by the application program. The developed result is displayed on the display 107 via the display driver 304 at step 1620. In the previous examples, Figs. 8A and 10A correspond to this display. If it is found at step 1617 that the font driver does not contain the font name, then the program proceeds to step 1619. Here the system font is enlarged or reduced to the requested size. The result is displayed on the display device via the display driver 304 at step 1620. In the previous examples, Fig. 9A corresponds to this display. When output destination is the printer Step 1612 is processing executed when the output is to the printer. It is determined at step 1612 whether the printer driver (302 or 303) contains the font name requested at step 1610. If the answer is YES, the program proceeds to step 1613; otherwise, the program proceeds to step 1615. A code conversion corresponding to the printer is carried out by the designated printer driver at step 1613, the code is transferred to the printer and printed out at step 1614, and processing is terminated. In the previous examples, Figs. 9B and 10B correspond to this print-out. The code conversion referred to here involves converting a system-specific code outputted by the window system into a code (which may be a language such as PDL or data) capable of being handled by the designated printer. If the font is not present in the printer, the font driver in which the font is present is requested to develop the font into a bit-map format at step 1615. Then, at step 1616, the image is transferred to the printer via this printer driver. Here the image is printed out and processing is terminated. <Modification> The present invention can be modified in various ways within the scope of the claims. In the four embodiments set forth above, the invention is applied to a configuration having one printer and one host system. However, the invention is not limited to this arrangement. For example, the invention is applicable to a case in which one printer server is shared by a plurality of host systems or a case in which one host system uses a plurality of printers. Of course, the present invention is applicable also to a case in which one or most host systems and one or more printers are connected to a network such as a LAN. Furthermore, though the system of Fig. 1 is itself a host system, the present invention is applicable also to an extended system in which the system of Fig. 1 is positioned with a so-called printer controller and the controller is further connected to another host computer. Further, the embodiments to which the present invention is applied may be a Japanese word processor, a work station or a computer system. In the foregoing embodiments, the fonts externally supplied to the printer are stored in a ROM cartridge. However, a large-capacity magnetic disk may be used instead of the ROM. It will be appreciated that the window system may include an operating system.

Claims: A character processing apparatus comprising download means for downloading a font to a printer (111), characterized by : first generation means for generating a printer font table storing font information including a font name and a data format regarding a font usable in the printer (111); second generation means for generating a computer font table storing font information including a font name and a data format regarding a font usable in a computer; and selection means for selecting a font, which is imbedded in the computer and not imbedded in the printer (111), having the data format usable by the printer (111), referring to the printer font table and the computer font table, wherein said download means (302, 303) downloads the font selected by said selection means to the printer (111). The apparatus according to claim 1, wherein the font information stored in the printer font table further includes storage location information. The apparatus according to claim 1, wherein the printer font table stores the font information for a plurality of printers. The apparatus according to claim 1, wherein said selection means determines whether downloading to the printer (111) is possible and, in the event it is determined that the downloading is possible, selects the font, which is imbedded in the computer and not imbedded in the printer (111), having the data format usable by the printer (111), referring to the printer font table and the computer font table. The apparatus according to claim 1, further comprising: means for determining whether the font name delivered by a character-output request from an application is in the printer font table; means for transmitting a code for the printer in the event that it is determined that the font name is in the printer font table; and means for transmitting an image for the printer in the event that it is determined that the font name is not in the printer font table. A character processing method comprising a downloading step of downloading a font to a printer (111), characterized in the steps of: generating a printer font table storing font information including a font name and a data format regarding a font usable in the printer (1404); generating a computer font table storing font information including a font name and a data format regarding a font usable in a computer (1406); and selecting a font, which is imbedded in the computer and not imbedded in the printer, having the data format usable by the printer (1408, 1409), referring the printer font table and the computer font table, and downloading the font selected in said selecting step (1408, 1409) to the printer (1410). The method according to claim 6, wherein the font information stored in the printer font table further includes storage location information. The method according to claim 6, wherein the printer font table stores the font information for a plurality of printers. The method according to claim 6, wherein it is determined whether downloading to the printer is possible (1407) and, in the event it is determined that the downloading is possible, the font, which is imbedded in the computer and not imbedded in the printer (111), having the data format usable by the printer is selected in said selecting step, referring the printer font table and the computer font table. The method according to claim 6, further comprising the steps of: determining (1416) whether the font name delivered (1414) by a character-output request from an application is in the printer font table; transmitting (1421) a code for the printer when it is determined that the font name is in the printer font table; and transmitting (1423) an image for the printer (111) when it is determined that the font name is not in the printer font table. A computer program including instructions for causing a processor to become operable to perform all the steps of a method according to any one of claims 6-10. A storage means storing a computer program according to claim 11.

Inventors: MATSUMOTO HIROTSUGU, MATSUMOTO, HIROTSUGU
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1992
Main classification: G06F3
IPC codes: G06F3