Font managing apparatus for a character generator5142613Abstract In a printing system having insertable font cartridges, a font managing apparatus selects fonts when there is a change in the font to be printed. For example, when a font cartridge is detached or interchanged, the font managing apparatus detects the interchange or detachment of the font cartridge and reselects another font. The font managing apparatus can also change the attributes of the font to be printed. Claims What is claimed is: Description BACKGROUND OF THE INVENTION
TABLE
______________________________________
Wide Classification
Narrow Classification
______________________________________
0 Alphabetical typewriter
1 Alphabetical typewriter
2 --
3 --
4 JIS KANJI code
5 --
6 for form overlay
7 for down load
______________________________________
*JIS (Japanese Industrial Standard)
FIG. 5(b) shows a structure of the narrow classification of a font of JIS KANJI code system as an example. The narrow classification code is comprised of a character style code of upper three bits (b.sub.4, b.sub.3 and b.sub.2) and combination information code of lower two bits (b.sub.1 and b.sub.0) In FIG. 5(b), ANK indicates the alphabetical character and "Kana" character. The structure of the narrow classification is defined in a proper manner to the wide classification to which the former belongs. Font global data is read out when the power switch is switched on or when the font cartridge is interchanged and read out font global data is memorized as FCB (font control bank) in SYS-RAM 303 upon registration of font information. (2) FONT MANAGEMENT INFORMATION (FCB) BMC 30 executes fundamental management for fonts based on internal logic codes which are registration numbers given upon registration into FCB (Font Control Bank), as will be explained later. FIG. 6(a) shows a composition of each FCB. FCB is comprised of ECB status, FCB information, physical position information, cartridge information and logic font attribute. The logic font attribute is defined as attribute registered in the font management information of each available font. As shown schematically in FIG. 6(b), respective FCBs of all available fonts are memorized in SYS-RAM 303 in the order of internal logic font codes given upon registration of FCB. FIG. 7 shows a composition of FCB in detail. As mentioned in FIG. 6(a), FCB is comprised of FCB status, FCB information, physical position information, cartridge information and logic font attribute. All data of addresses from .phi. to 1FH are formed upon selection of a font. Slot number at 2nd address and bank number in slot at 18-th and 19-th addresses are used for selection of a font, respectively. Data of addresses from 20 to 2F is font global data (cartridge information) read from respective cartridge. FCB status is provided for indicating statuses of various flags. Flags are defined as follows: BUILD for indicating completion of FCB registration; FONT for indicating font style; ROM/RAM for indicating whether the memory of cartridge is ROM or RAM; KANJI for indicating a chinese character font; DOWN-LOAD for indicating a font cartridge for loading system programs and the like; READY for indicating an enable state of font selection LOADED for indicating whether font data is loaded into a font RAM or not; FDIR for indicating registration of a font directory; and SPECIAL for indicating a special font. FCB information includes data as follows: slot number, font address defined by linear address in a slot, top bank number of font directory registration, number of D-BANK indicating a number of banks into which respective font directories have been registered, starting address of "Kanji" font pattern indicating the top address of "Kanji" font pattern, font size indicating total number of bytes constituting font pattern data, maximum character code indicating the largest character code having a directory and total byte number indicating a total volume of respective font. Physical position information includes bank off-set indicating an off-set value of a bank determined upon generating addresses for accessing respective font and F-BANK number for indicating a bank number in respective slot. Cartridge information (font global information) includes data as follows: font style indicating a kind of use of a font, font type indicating a kind of character type of a font, font name for selecting a font by the name thereof, maximum character code in a font, font cell width indicating the maximum width of character, font cell height indicating the maximum height of character, position of base line, font registration number indicating an article number, font volume information No. 1 indicating combination information and bank size information, and font volume information No. 2 indicating a bank size coefficient. The area of logic font attribute is provided next to the cartridge information although it is not shown in FIG. 7. The logic font attribute includes use code, character type, character kind, character pitch, character height, character style and character weight. (3) DIRECTORY REGISTRATION AREA (D-BANK) Font directory is management information indicating individual characters memorized in the font ROM. However, if the font ROM is accessed every character, the through-put of data is lowered since processing parallel to imaging characters becomes impossible. In order to avoid this problem, the directory of the selected font is loaded into SYS-RAM 303. Since this enables the parallel processing of imaging characters, processing time can be shortened. Directory registration area is provided next to the FCB area. As shown in FIG. 8(a), this is formed by 8 banks from D-BANK .phi. to D-BANK 7 of a ring buffer composition (one bank has a volume of 2 K bytes). Namely, D-BANK is defined as a section of the directory registration area. Upon each registration of a font, plural D-BANKs can be used according to a directory size, if necessary. FIG. 8(b) shows a state of directory registration of four kinds of fonts (cross hatched areas show D-BANK used upon directory registration). With respect to each directory, top bank No. and directory size (bank No.) are defined and registered at 7-th and 8-th addresses, respectively. Further, directory registration flag FDIR indicating that at least one directory has been registered in a D-BANK and status valid flag indicating the validity of font management information included in each FCB are registered at zero-th address for FCB status. Also, D-BANK flag indicating existence of directory information is provided in each D-BANK. FIGS. 9(a), 9(b) and 9(c) show actions of a BANK pointer upon renewal of font directory. If the font F5 having a directory of volume of three D-BANKs is selected in the state shown in FIG. 9(a) and the directory thereof is not registered, three D-BANK flags of D-BANKs from No. .phi. to No. 2 are reset at zero, respectively, as shown in FIG. 9(b). Then, the directory of the font F5 is loaded from D-BANK No. 7, as shown in FIG. 9(c). (4) FONT REGISTRATION AREA (VFCB) When an user designates a font by an identification number, the information of the designated font is memorized in a font registration area (hereinafter referred to VFCB) of SYS-RAM 303. In such a case that a font is designated by an ID number, if the font cartridge containing the designated font is drawn out after registration of the ID number, another font having attributes close to those of the designated font is selected as far as it exists and, therefore, logic font code in VFCB is renewed. Thus, VFCB may have logic font code not corresponding to that of the designated font and the selected font is considered to be a virtual font in this case. In this context, the ID number is called VFCB code or virtual font code sometimes. FIG. 10(a) shows a composition of each virtual font registration (VFCB) area. VFCB area is provided in SYS-RAM 303. Considering possibility of expansion of the system, an area of 32 bytes is given to each VFCB. As shown schematically in FIG. 10(b), all of VFCBs of available fonts are memorized, respectively. VFCB is comprised of VFCB status determined upon entry of an ID number, logic font code and virtual font attributes. VFCB status includes a flag indicating that the VFCB has been registered and is valid. Logic font code is a registration number for managing fonts in internal processing and indicates FCB area in which respective font information is registered. Virtual font attributes are defined as those of VFCB set by an user in accordance with protocols from the external data processor 1. Data composition of virtual font attributes is shown in FIG. 11 in detail. Virtual font attributes include a use code, character type, character kind, character pitch, character height, character style and character weight each of which corresponds to individual global data and have the same data composition as that of logic font attributes of FCB. (c) Font selection As will be later explained in detail, there are three stages for selecting a font in the image editing processing. Namely, initial font selection upon switching on the power source, font selection by protocols from the external data processor 1 and font selection after interchange of a font cartridge are performed. When the power source of the printer is turned on, any selection is not requested by the external data processor 1. However, the printer has default values for initialization including a default value for font selection, and according thereto, font selection processing is executed. The font selection by protocols from the external data processing 1 is performed according to either one of four ways, as shown in FIG. 12. (1) Slot and Bank selection As already explained in connection with FIG. 4, a slot number and an F-BANK number are assigned to each of mounted font cartridges upon reading font attributes and are registered in the corresponding FCB. Accordingly, it is possible to select a desirable font directly by designating a slot number and an F-BANK number in the slot. (2) Font name selection As already explained in connection with FIG. 7, the font name is included in the global information of each FCB. Therefore, it is also possible to select a desirable font indirectly by designating a font name. (3) ID selection An user can assign an ID number to respective font freely. Therefore, it becomes possible to select a desirable font by designating an ID number through the external data processor 1. When a font is selected or designated, internal logic codes of the selected font including logic font code, slot number, BANK number, font name ID number and so on are selected. If the cartridge corresponding to the selected font is not mounted, another font having attributes closest to those of the selected font is searched and selected. Selection information is comprised of these selected values and LAST SELECT MODE code. This LAST SELECT MODE code indicates the selection mode which was executed just before interchange of font cartridge among "slot and BANK" selection mode 1, "font name" selection mode 2 and "ID" selection mode 3. And, the code corresponding to the selection mode is set at an area assigned to LAST SELECT MODE. Upon renewal of selection information in the font selection, LAST SELECT MODE and corresponding selection value are renewed. (4) Image selection Although methods for font selection above mentioned are dependent on physical information such as physical position of the slot, the image selection is dependent on images regarding each font. This image selection includes first and second methods as follows. According to the first method, individual nicknames are given to identify respective attributes of each VFCB. Nicknames are prepared for Style, Width, Height and Thickness (Weight). As nicknames for Style, "Normal" and "Italic" are prepared to indicate levels of Style. As nicknames for Width, numerals representing character pitches are prepared to indicate individual levels of the character size. As nicknames for Height, numerals representing points of character are prepared to indicate individual levels of the character height. As nicknames for Thickness, "Light", "Medium", "Bold" and "Extra bold" are prepared to indicate levels of the character weight.
TABLE 2
______________________________________
Absolute level
Nickname -2 -1 0 +1 +2
______________________________________
Style Normal Normal Normal Italic
Italic
Width (Pitch)
20 15 12 10 6
Height 6 9 12 18 24
Thickness Light Light Medium Bold Extra
(weight) Bold
______________________________________
When these nicknames are entered, an absolute level is searched and determined in accordance with the combination of entered nicknames and attributes of the corresponding VFCB are renewed into values of attributes of a font identified by the determined absolute level As is clearly shown in Table 2, the character width and height become large and the character weight becomes thick as the absolute level increases. Although all of default values in Table 2 are given beforehand, they can be set at user's side. According to the second method, properties each of which is comprised of plural font attributes are represented by respective nicknames in order to identify an absolute level. These nicknames are chosen so as to fit to human senses. This enables to select or designate a font according to images or impressions thereabout. Table 3 shows an example of nicknames.
TABLE 3
__________________________________________________________________________
Absolute level
Nickname -2 -1 0 +1 +2
__________________________________________________________________________
Emphasis
Weight
Light
Light Medium
Bold Bold
Pitch
15 12 12 12 10
Softness
Type Normal
Italic
Normal
Italic
Normal
Kind Gothic
Gothic
Courier
Courier
Times-
roman
Total
Pitch
20 15 12 10 6
size Height
6 9 12 18 24
__________________________________________________________________________
The nickname "emphasis" is defined by the character weight and the character pitch so as to correspond to either one of absolute levels from (-2) to (+2). Similarly, the nickname "softness" is defined by the character type and the character kind and the nickname "total size" is defined by the character pitch and the character height. When respective nicknames and relative levels of them are designated, an absolute level is searched and determined in accordance with these data and values of attributes corresponding to the determined absolute level are registered as a VFCB. The processing for altering the font can be done similarly to that of the first method. However, the number of attributes corresponding to one nickname is different from that of the first method. It is difficult to search an absolute level in the second method since attributes of VFCB are defined as parameters. In order to avoid this problem, it is desirable to provide tables for memorizing respective absolute levels corresponding to nicknames, as shown in FIG. 13(b). Each nickname can be defined by three or more attributes. Font reselection to be done after interchange of the font cartridge, after down-load of font data or upon selection by various emulaters can be done as follows. At first, font attributes are read into again, then LAST SELECT MODE data is read out and a font is selected in accordance with select values corresponding thereto. If this font selection is impossible to do, a font defined by default values is selected similarly to the case of switching on of the power source. Font RAM is treated as follows. If it is not backed up with a back-up power source, font data which have not been registered in an FCB is registered thereinto upon renewal since it is considered to be unloaded or mounted newly. If it is backed up with a back-up power source, it is decided according to information of the external input switch whether font data has been registered in the FCB or not. (d) Image Edition and Initialization FIGS. 14(a) and 14(b) show the main routine to be executed by CPU 301 of BMC 30. When the power switch is switched on, internal initialization is performed at step #1 and SYS-RAM 303 and BM-RAM 32 are cleared at step #2. Next, font attributes such as cell size are read into at step #3 and, then, initial settings such as initial setting by switches, initial setting of internal default values including default values for selecting a font and initial font selection are executed at step #4. As initial settings by switches, resolution upon imaging, protocol transformation tables corresponding to various protocols and interface switching (CENTRONICS, RS 232C) are set. As initial settings by internal default values, initial font selection and initial margin setting are performed. Thereafter, the process enters into a processing loop for data received from the external data processor 1. When at least one font cartridge is interchanged or when font data is down-loaded (at step #11 or #12), attributes of respective font are read similarly to the case of switching on the power switch since available fonts are changed (at step #15). At step #16, LAST SELECT MODE is read out and the font selection is done in accordance with select values corresponding to the LAST SELECT MODE at step #17. If it is decided impossible, a font in the BANK of the minimum number of the slot having the minimum number is selected as the default font at step #19. These steps from #11 to #19 can be replaced with steps from #11' to #14' in FIG. 14'. Namely, a flag is read at step #11' which is set according to information given by means for detecting interchange of the font cartridge. If a font cartridge is now being interchanged, the process waits until the interchange of font cartridge is finished. However, data receiving operation is continued during the waiting time. If a font cartridge is not in interchanging, it is decided at step #12' whether or not font altering operation has been finished If the font having been selected is to be altered, attributes of each font is read into at step #13' and, then, a font is reselected at step #14'. Namely, renewal of internal information is executed according to the font alteration and the default font which is selected upon switching on the power source is reselected. As stated above, the font reselection is requested upon the interchange of font cartridge or upon down-load of font from the external data processor 1. As to alteration methods of font and internal information, they will be explained later. According to this processing, analysis of received data is not performed in altering a font. This enables to avoid data errors which may be caused by noises caused by the interchange of cartridge and, therefore, misprocessing to the received data can be avoided. Further, it becomes possible to register a font which was not registered upon receiving data since, due to the processing for reading font attributes and that for reselecting a font, all of available fonts are registered newly after the font alteration. Next, it is checked at step #21 whether or not P-RAM 305 has at least one empty area and, at step #22, it is checked whether or not data is stored in R-buffer 304. If P-RAM 305 has at least one empty area and R-buffer 304 has data therein, data is read out from R-buffer 304 at step #23 and protocols related to the print format and font selection are analyzed and processings needed from the result of protocol analysis are performed at step #24. Font selection is performed according to procedures shown in FIGS. 24(a), 24(b), 25 and 27 as the result of protocol analysis. If P-RAM 305 does not have any empty area or no data is received in R-buffer 304, no processing is done. Next, if BM-RAM 32 is possible to access since the printer is not printing (at step #31), if JOBACT flag is not set, namely the printer is not in multi-printing (at step #32) and if the latest character is not being written into BM-RAM 32 (at step #33), data in P-RAM 305, if it exists therein (at step #34), is read out at step #35 and read data is analyzed and processed at step #36. If the data is decided to be PAGE EJECT code as the result of analysis at step #37, JOBACT flag is set at step #41 to enter printing operation. If it is not PAGE EJECT code, the process returns to step #11 in order to process the next data. The above processing is not performed if BM-RAM 32 is in writing or there is no data in P-RAM 305 even when the printer is not in printing. When JOBACT flag is set at step #41, PFCMD for requesting paper feed is outputted at step #42, the interface of PHC 42 is set in the enable state for printing at step #43 and PRCMD (print command) is outputted to the interface controller 40 at step #44, and, due to this, the printing operation is started. The interface controller 40 outputs EXPAND whenever an exposure of image is completed and control of the number of prints is performed by receiving EXPAND at step #45. When JOBEND indicating completion of printing is detected at step #46, JOBACT flag is reset to release the printing state and BM-RAM 32 is cleared at step #47. FIG. 15 shows a flow chart of the processing for reading font attributes from each of mounted font cartridges. This processing is performed to generate font management information for font selection upon switching on the power switch or font interchange of a font cartridge. At first, pre-processing for a RAM cartridge is executed at step #61. Next, respective font cartridges are checked. At first, Read/Write check is performed with respect to the top one byte of the top F-BANK .phi. of the top slot at step #71. If it is not a font RAM (at step #72), font global data is read into at once at step #73. If the value of font style is equal to .phi.FFH (YES at step #74), it is decided that there is no font cartridge. If it is not so (No at step #74), ROM flag of FCB status is set at step #75, style status FONT flag indicating a font style is set at step #76 and, then, data is registered into the corresponding FCB at step #77. If it is decided to be a font RAM at step #72, RAM flag of FCB status is set at step #81 and style status in FCB status is set at a special specification at step #82. Next, the font style at the top of each F-BANK is rechecked at step #83. If it is not cleared in the processing for initial setting of status (See FIG. 16), LOADED flag of FCB status is set at step #84 as is considered to be a valid font and font global data is read into at step #85 and registered in the corresponding FCB at step #77. Analysis of font attributes is thus performed about all F-BANKs and all slots (at steps #91 and #92). FIG. 16(a) shows a flow chart of a subroutine for initial setting of font status. It becomes necessary to renew the font management information if a font cartridge having the font memory wherein the font having been selected at the present is stored. This subroutine is provided therefor. At first, FCB pointer indicating the top address of FCB is initialized at step #101. If it is decided that the font memory is not a font RAM (No at step #102) or if it is decided that the font memory is a font RAM but it is not registered as loaded (NO at step #103), the top one byte of F-BANK is cleared, namely, ".phi.FFH" is written thereinto at step #104. If the font RAM is registered as loaded, the global data thereof is compared with all of global data of all slots and all F-BANKs to find a font cartridge having the same global data. If the font cartridge is not found at step #106, the top one byte of F-BANK is cleared at step #104 since this means that the font cartridge has been drawn out. Positions of slot and BANK are determined from the FCB. If the font memory is a font RAM, the process skips steps #103, #105 and #106 since it is not cleared. If the same RAM cartridge is found out at step #106, no processing is done. This processing is repeated until all of FCBs are registered (at step #107). Next, each top one byte of all BANKs not registered as loaded RAMs is cleared at step #108 and, then, the FCB area is cleared at step #109. Accordingly, ".phi.FFH" is memorized at respective top one byte of all F-BANKs including empty slots other than loaded RAMs and ROM fonts and, therefore, the discrimination information needed upon the processing for reading font attributes shown in FIG. 15. FIG. 16(b) shows the subroutine #108 of FIG. 16(a) in detail. At first, pointers for indicating the top addresses of the slot and BANK are initialized at step #111. Next, it is checked at step #112 if the RAM font is registered as loaded RAM in the corresponding FCB. If it is not registered, the state of the external input switch of each font cartridge is read at step #113. If it is decided at step #114 that the font is not a loaded RAM font, the top one byte of the font is cleared at step #115. The processing is performed about all slots and all BANKs. FIG. 17 shows a flow chart of the subroutine #77 for registering font information shown in FIG. 15. As shown in Table 1, font cartridges for alphabetical fonts of two kinds, a font cartridge for JIS KANJI font and a font cartridge for form overlay font are prepared in the present preferred embodiment. When global information of a valid font is read, font information thereabout is registered according to this processing. At first, font style data in the global information is read at step #121. If it is discriminated to be the Kanji font at step #122 or the special font at step #125, a proper FCB status is set at step #123 or #126. With respect to the Kanji font, management information proper thereto, namely information of the top address thereof is registered together with the normal management information of a font at step #124. In the case of an alphabetical font, only individual information of FCB is registered at step #127. Finally, FCB REGISTERED flag which indicates that the information of the corresponding FCB has been registered is set at FCB status at step #128. Thus, all of FCBs regarding fonts available at the moment of switching on the power source are registered in system RAM 303. FIG. 18 shows a flow chart of a subroutine for registering individual font directories. When the directory of the default font is selected upon switching on the power switch, a number of D-BANKs is read at step #141. If the number of residual BANKs is not short at step #142, the process is advanced to step #146, the directory of the selected font is registered into empty BANKs of a work area of a D-BANK in the order from D-BANK No. .phi. to D-BANK No. 7 whenever a registered font is selected. Then, a logic number is assigned to the used font at step #147 and, at the same time, the top BANK number of the used D-BANK is memorized in FCB at step #148. If the number of empty BANKs is short (at step #142), the processing for making an empty space enough for registering the directory is performed as shown in FIGS. 9(a) to 9(c) schematically. As stated already, D-BANK has a structure of ring buffer and, therefore, BANKs are used to register the directory except for BANKs in use (at step #143). At that time, SELECTED flag of FCB status is cleared at step #144 and the directory of the old font is made invalid at step #145. FIG. 19 shows a flow chart of the subroutine for selecting the initial font in the initial setting processing shown by step #4 in FIG. 14(a). As the initial font (default font), a font having the minimum BANK number in the slot of minimum number is determined among available fonts. At first, the logic font code is set at one at step #161. Then, the font selection processing is performed with respect to all fonts registered in respective FCBs at step #162 (See FIG. 20). If it is performed normally at step #163, the DEFAULT mode is memorized as selection information about the present font at step #164. If no font selectable as the default font is registered in respective FCBs (at step #163), it becomes impossible to perform printing operation since BM-CPU 301 cannot read font data by failing to set the default font. Therefore, if the font is not the last font at step #165, the logic font code is incremented at step #166 to perform the font selection again at step #162. If it is not possible to select the default font until the last font, an error caution is displayed at step #167. FIG. 20 shows a flow chart of the font selection processing by the logic font code. At first, the selected logic font code is read at step #181. If the font is not selected yet at step #182, FCB pointer is shifted from the logic font code at step #183 in order to read FCB status at step #184. If the REGISTERED flag has been set at step #185 and if the FCB status indicates a font at step #186, it is checked whether the directory thereof has been registered or not at step #187. If it is not registered yet, the directory registration operation is performed at step #188 (See FIG. 19). Next, a font cell is set at step #189 (See FIG. 21). If the font has been selected already at step #182, SELECTED flag indicating the FCB into which the font has been registered is set on directly at step #190. If REGISTERED flag is not set on at step #185, or if the FCB status does not indicate a font at step #186, process returns without doing any processing. FIG. 21 shows a flow chart of the subroutine of step #189 in FIG. 20 for setting a font cell. This processing is provided for registering the character space and line space which are used to move a cursor in unit of character. Since these spaces can be designated by an user, it is checked at steps #200 and #205 if they have been designated or not. If they have been designated, the following processing is not performed. If they have not been designated, the maximum character width is read into from FCB global data at step #201. If the lateral double space is designated by protocols from the external data processor 1 at step #202, the cell width is doubled at step #203 and the doubled cell width is registered as the character space at step #209. FIG. 22 shows a flow chart of a subroutine for renewing virtual fonts to be stored in individual VFCBs. This processing is performed in order to give the most suitable font upon switching on the power switch or upon interchanging a font cartridge. At first, VFCB pointer is set at the top of VFCB area at step #221. If the font has been registered in the corresponding VFCB at step #222, logic font codes are registered in the corresponding VFCB at step #223. This processing is repeated with respect to all of VFCBs at step #224. FIG. 23 shows a flow chart of the subroutine #223 of FIG. 22 for registering logic font codes. In this processing, a font having attributes closest to those of the VFCB can be searched. At first, a status at the top of the present VFCB is read at step #241. If it indicates the registration thereof, the process is advanced to step #243. At step #243, LFNO for indicating the number of the closest font and MAX.sub.-- MATCH indicating the matching depth thereof are reset at zero, respectively. Then, logic font attributes of the first FCB are read at first at step #244 and the parameter MATCH indicating the matching depth between virtual font attributes of VFCB and logic font attributes of FCB is initialized at step #245. Comparison of the former with the latter is made sequentially from the use code to the character weight. One of virtual font attributes of the present VFCB is read at step #246 and it is compared with the corresponding logic font attribute at step #247. If it coincides with the latter, the parameter MATCH is incremented by one at step #248. This parameter MATCH is usually incremented if both of them coincide with each other, but as far as the character pitch and character height are concerned, it is incremented when the logic font attribute closest to the virtual font attribute is found even if they do not coincide with each other perfectly. When the comparison with respect to all of seven font attributes have been completed at step #249, MATCH is compared with MAX.sub.-- MATCH of the latest font, and if the former is larger than the latter at step #250, the latest MAX.sub.-- MATCH and LFNO are renewed by MATCH and the present FCB No. at step #251. Logic font attributes of the next FCB are compared similarly. When the attribute comparison has been completed with respect to all of registered FCBs, the logic font code (LFNO) of the font having the largest MATCH is registered as the logic font code of VFCB at step #253. FIG. 24 shows a flow chart of the font down-load processing. Data composition in the font down-load processing is comprised of down-load slot data, font data and check sum data. The check sum data is data obtained as the result of addition of all transmitted data and is compared with the result of addition of all data received by the character generator. If they do not coincide with each other, "TRANSMISSION ERROR" is displayed. At first, the slot number designated by the external data processor 1 is read at step #291 and the status of the FCB corresponding thereto is read at step #292. If the font cartridge designated by the slot number is not a RAM font cartridge at step #293 (RAMFONT flag OFF), or if it is a RAM font cartridge into which font data has been down loaded already (LOADED flag ON at step #294), an error processing is executed at #295, namely, "COMMAND ERROR" is displayed. If it is an unloaded RAM font cartridge, font data transmitted from the external data processor 1 is read and written into the font RAM thereof sequentially at step #296. At step #297, check sum data is calculated by counting the read font data upon writing them into the font RAM. When the down-load of font data has been completed, the check sum given by the external data processor and that calculated at step #297 are compared at step #298. If they do not coincide with each other, "COMMUNICATION ERROR" is displayed at step #300. If they coincide with each other, LOADED flag of the status of the FCB is set on at step #299. (e) FONT Reselection When font selection is indicated by the external data processor 1, it is executed according to either one of four methods as stated in the section (b). (1) Font selection by slot and BANK Nos. FIGS. 25(a) and 25(b) show a flow chart of the font selection by slot and BANK Nos. In the present invention, font selection by slot No. and that by BANK No. are provided separately with each other. According to the former font selection, the font of the top BANK (first BANK) of the slot designated by a slot number is selected when the slot number is designated. On the contrary, according to the latter font selection, when an F-BANK No. is designated, the font of the F-BANK designated thereby is selected within the slot having been selected at present. The font selection is performed based on the analysis of received data at step #24 of FIG. 14(a). At first, the number of the slot (F-BANK) having been selected at the present is read at step #271. If it coincides with that designated by a command from the external data processor 1 (at step #272), the following processing is not performed since the font has been selected already. If it does not coincide with, the maximum number of kinds of registerable fonts is set to a loop counter provided as a search counter at step #273 and FCB pointer indicating the top address of FCB is set at zero at step #274. If the font selection is requested by the slot number (YES at step #277), the slot number and the number of F-BANK in the slot are read subsequently at steps #275 and #278. Then, they are compared with the designated slot No. and F-BANK No. in the slot at step #276 and #279, respectively. This comparison is repeated until the corresponding font is found out. As stated above, all of slots are searched in the font selection by the slot No. and, in the font selection by the F-BANK No., all of fonts contained in one slot (font cartridge) are searched. If there is not any corresponding slot or F-BANK, or if the corresponding slot or F-BANK in slot is not registered as FCB, the process returns without doing any more processing. Next, FCB status of the corresponding font having been searched is read at step #281. If font flag FONT has been set at #282, the font is recognized and, if the global information has been registered in FCB at step #283, it is recognized as a valid font. Next, if the directory thereof is considered not to have been registered by referring to directory registration flag FDIR at step #284, the directory registration processing (See FIG. 18) is executed at step #285. As stated above, in the directory, information related to each character such as character size, an address of the corresponding dot pattern and the like is included. Next, the font cell setting processing (See FIG. 21) is executed at step #286 to renew the character space and line space for print format control according to the selected font and, then, SELECTED flag is set at step #287. Finally, the selection information is renewed at step #288. Namely, the last select mode and either or both of the slot No. and the F-BANK No. are renewed according to the requested method. If any font is not recognized at step #282 and if font data is not registered at step #283, the process skips steps from #284 to #288. (2) Font Selection by Font Name FIG. 26 shows a flow chart of the font selection by the font name. Procedure in this routine is substantially same to that in the font selection by slot and F-BANK Nos., but the former is different from the latter in that selection information is comprised of a font name defined with use of six characters. At first, the font name having been selected at the present is read at step #301. If it coincides with the font name designated by a command from the external data processor 1 at step #302, the process skips the following search steps since this means that the font has been selected already. If the font having the designated font name has not been registered yet, FCB pointer indicating the top address of FCB is set at zero at step #303. Then, each font name of FCB is read at step #304 and it is compared with the designated font name at step #305. This search is continued until the font name coinciding with the designated font name is found out. If the corresponding font is not found out till the last font, the process returns without executing any further step (step #306). Next, the FCB status of the searched font is read at step #311. If the font flag FONT has been set, the font is considered to have been registered in an FCB at step #312. Further, if it is recognized as a font at step #313, it is considered to be a valid font. Next, if it is decided at step #315 by referring to FDIR that the directory of the font have not been registered, the directory is registered at step #315 (See FIG. 15). Next, the font cell setting processing (See FIG. 21) is executed in order to renew the character space and line space for the print format control according to the selected font at step #316 and, then, SELECTED flag is set at step #317. Finally, the selection information is renewed at step #318. If the searched font is not registered in an FCB (at step #312) or if it is not recognized as a font at step #313, the process skips steps from #314 to #318. (3) Font Selection by ID Number When an user designate an ID No. through the external data processor 1, it is registered in the analysis & processing process for received data. And, the font can be altered by the designated ID No. FIG. 27 shows a flow chart of the font ID registration processing. At first, the designated ID No. (VFCB code) is read at step #331, the logic font code having been selected at the present is registered in the designated VFCB at step #332 and, also, the logic font attributes of the corresponding FCB are registered into VFCB at step #333. Thereafter, VFCB REGISTERED flag is set at #334. FIG. 28 shows a flow chart for the font selection by ID No. When the font selection by ID No. is requested by a command from the external data processor, the designated ID No. is read at step #351 and it is checked at step #352 whether or not any font registered in the corresponding VFCB exists at step #352 and, if it exists, the corresponding logic font code is read at step #353. Then, the font selection processing shown in FIG. 20 is executed at step #354 and the selection information including ID mode, ID No., and the like is renewed at step #355. Although the designated ID No. is registered corresponding to the font having been selected upon registering it in the present embodiment, it is also possible to register a combination of the designated font name and at least one specified attribute. (4) Font Selection by Images about Each Font FIG. 29 shows a flow chart for the font selection by images. In this processing parameters of three kinds, namely, a desired ID No., nicknames regarding attributes of a desired font and relative weight values of those attributes are input by an user. At first, the designated ID No. and nicknames of attributes are read at steps #371 and #372 and values of VFCB corresponding to them are searched at step #373. Then, the absolute level at the present is calculated from the values of VFCB using Table 2 at step #374. Next, an absolute value is calculated by adding designated relative weight with the absolute level at step #375 and again, Table 2 is searched at step #377. Then, parameters to be altered are read at step #378 and parameters of VFCB are renewed to the former parameters at step #379. Thereafter, VFCB registration is executed at step #380 (See FIG. 23). Then the font selection is executed in accordance with the registered VFCB at step #381. The preferred embodiments described herein are illustrative and not restrictive, the scope of the invention being indicated by the appended claims and all variations which come within the meanings of the claims are intended to be embraced herein.
|
Same subclass Same class Consider this |
||||||||||
