Character pattern forming method and apparatus

Abstract: Character forming method and apparatus are provided. Font data is stored. The conditions to develop the stored font data are stored. An area to develop the font data is reserved in a memory in accordance with the stored conditions. The font data is developed in the area reserved. The font data is vector information. The condition to develop the font data is that the data is either one of the outline data, shadow data, and filler data. The bit map patterns of filler pattern, outline pattern, and shadow pattern are formed in accordance with the developed font data and are individually stored.

Description: BACKGROUND OF THE INVENTION Field of the Invention The present invention relates to character pattern forming method and apparatus for generating a character pattern of a desired color or a designated hatching pattern from a color hatching pattern or a plurality of kinds of hatching patterns. Related Background Art A conventional method of forming a modified character such as outline, shadow, and the like for a bit map font which is obtained by developing a dot font or a scalable font will now be described with reference to Fig. 8. First, a pattern of an original character is repeatedly copied while shifting such a pattern by a distance corresponding to a thickness of an outline. The pattern which was shifted by the width of the outline is repeatedly copied while shifting such a shifted pattern in the direction of a shadow by a distance corresponding to a length of shadow, thereby forming an OR pattern portion (81) in which the original character was thickened by the amount corresponding to the width of outline and the length of shadow. By subsequently reversing the original character pattern, an AND pattern portion (82) is formed. By getting the AND of the AND pattern portion (82) and the OR pattern portion (81), a pattern of a modified character (83) is formed. In the above conventional method, however, all of the modified character such as outline and shadow are formed as patterns by the OR portion and AND portion as shown in Fig. 8, the color or hatching pattern of each of the outline portion and shadow portion cannot be designated or a filler portion cannot be designated by a different color. It is known from JP-A-63286352 to provide shadow and color flags for use in controlling the manner in which a printer outputs a character. It is also known from EP-A-0385269 for original character information in the form of outline parameters to be scaled and filled in order to provide output characters of varying size and thickness. According to the present invention there is disclosed a character pattern forming method according to claim 1. Fig. 1 is a diagram showing a whole construction of a printing apparatus according to an embodiment of the invention; Fig. 2 shows a flow of data in the printing apparatus; Fig. 3A is a constructional diagram in a page memory; Fig. 3B is a diagram showing a data structure of each record in the page memory of Fig. 3A; Fig. 4 is a flowchart for explaining a modified character processing procedure stored in a program ROM; Fig. 5 is a diagram showing a method of forming a filler pattern and an outline pattern; Fig. 6 is a diagram showing a method of forming a shadow pattern; Fig. 7 is a diagram showing a difference of the memory structures due to the presence or absence of a font cache; Fig. 8 is a diagram showing a conventional method of forming a modified character; and Fig. 9 is a diagram showing a method of forming a modified character according to the invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described in detail hereinbelow with reference to the drawings. Fig. 1 is a block diagram for explaining a construction of a printing apparatus according to an embodiment. Reference numeral 1 denotes a printer main body; 2 a host computer serving as a data supply source; 3 a CPU to control the component elements in the printer main body 1 in accordance with a program stored in a program ROM 5; 4 an input interface to store data which is sent from the host computer 2; 5 the program ROM in which control programs including programs of flowcharts, which will be explained hereinlater, have been stored; 6 a font ROM in which scalable fonts (characters stored by being expressed by stroke information instead of dot signals) corresponding to input character codes have been stored; 7 a built-in RAM as a memory medium including a developing memory of a modified character; and 8 an output unit to print. Fig. 2 shows a flow of data in the printer. When the input interface 4 receives data from the host computer 2, the input interface 4 transfers the data to an input buffer 9 provided in the built-in RAM 7. The transferred data is analyzed by the CPU 3 and is edited into a record format every page in a page memory 10 as an individual command as shown in Figs. 3A and 3B. The edited record is subsequently analyzed by a drawing routine and is developed as a bit map image in a bit map memory 11. With respect to a character, a bit map forming routine for character processing is called in this instance. The present invention relates to such a bit map forming routine and will be explained in detail with reference to a flowchart of Fig. 4. The bit map image formed by the drawing routine is transferred to the output unit of the printer main body and is printed. Fig. 3A shows the page memory 10 in Fig. 2. The records of one page have been edited in the page memory. Fig. 3B further shows a detailed data structure of the record. A pointer to the next record is stored in the record and is linked. One record shown in Fig. 3B relates to a record regarding a character. The record includes bit flags indicative of the presence or absence of a FILLER PATTERN, an OUTLINE PATTERN, and a SHADOW PATTERN. When a character is not modified, all of those three bits are set to 0. When there is a modification of a character, the flag of the modified pattern is set to 1. With respect to the patterns whose flags are set to 1, information of the color is given to each pattern. Fig. 3B shows an example in the case where all of three bits are set to 1. The color information of each pattern is shown by 256 gradations using the values of 0 to 255. As the numeral is large, a ratio of the color increases. For example, in the case where the color of the filler pattern is designated to yellow, the values of Y = 255, M = 0, C = 0, and K = 0 are stored as color information in the filler pattern portion. Although not shown in Fig. 3B, as information of a character, information such as character size, character pitch, filler pattern number, thickness of outline, shadow pattern number, direction of shadow, length of shadow, and the like is further described. Fig. 4 is a flowchart for explaining a character modification processing procedure stored in the program ROM 5. The above procedure will now be described hereinbelow with reference to the flowchart. As described in Fig. 2, a bit map forming routine of a character is accessed from the drawing routine with regard to the character on the basis of the record information in the page memory. First, in step S1, the character information described in the record is obtained. In step S2, on the basis of the character information such as character code, character size, character pitch, and the like obtained in step S1, the scalable font stored in the font ROM 6 is developed to the font of the designated size, thereby forming a bit map in the built-in RAM 7. In step S3, whether there is a character modification or not is judged on the basis of the character information obtained from the record in step S1. If YES, a filler pattern memory is reserved in the RAM 7 in step S4. In this instance, the memory size of the filler portion is calculated on the basis of the character information obtained and is reserved. When there is no character modification, the processing routine is directly returned to the drawing routine as an editing routine of the bit map. In step S5, whether there is an outline modification or not is judged on the basis of the character information obtained from the record in step S1. If YES, an outline pattern memory is reserved in the RAM 7 in step S6. In this instance, as a memory size which is held in the RAM 7, the size of the outline portion is calculated on the basis of the character information obtained and is reserved. When there is no outline modification, no outline pattern memory is reserved. Similarly, in step S7, whether there is a shadow modification or not is judged on the basis of the character information obtained from the record in step S1. If YES, a shadow pattern memory is reserved in the RAM 7 in step S8. In this instance, as a memory size which is reserved in the RAM 7, the size of the shadow portion is calculated on the basis of the character information obtained and is reserved. When there is no shadow modification, no shadow pattern memory is reserved. As mentioned above, the filler pattern memory is first reserved in the RAM 7. Subsequently, the outline pattern memory and the shadow pattern memory are reserved in the RAM 7 as necessary. The filler pattern memory, outline pattern memory, and shadow pattern memory are reserved in a font cache memory in the RAM 7 in the case where the font cache function exists in its character output apparatus. In step S9, bit maps of the filler pattern memory, outline pattern memory, and shadow pattern memory are formed on the memories held and the processing routine advances to the drawing routine. Fig. 5 shows a forming method of a filler bit map pattern and an outline bit map pattern. A bit map pattern 50 obtained by developing the scalable font in step S2 is copied into the filler pattern memory, thereby forming a filler pattern 51. As for an outline pattern 55, the filler pattern 51 is first copied into the outline pattern memory (52) and is copied and thickened (53) while shifting the pattern by an amount that is twice as large as the thickness of outline on the basis of the character information obtained in step S1. Subsequently, while the bit of the filler pattern is reversed (54), the AND with the outline pattern is calculated, so that the outline pattern 55 can be formed. Fig. 6 shows a forming method of the shadow pattern. As for the shadow pattern, in case of no outline (65), the filler pattern is first copied into the shadow pattern memory (62) and is copied and thickened (63) while shifting the pattern in the shadow direction by an amount corresponding to the length of shadow on the basis of the character information obtained in step S1. Subsequently, while the bit of the filler pattern is reversed (64), the AND with the shadow pattern is calculated, so that a shadow pattern 65 can be formed. When there is an outline, the shadow pattern is formed in parallel with the outline pattern. First, when the pattern which has been thickened by an amount of the thickness of outline is formed in the outline pattern memory, the pattern is copied into the shadow pattern memory (66). The pattern is subsequently copied and thickened (67) while shifting the pattern in the shadow direction by an amount of the length of shadow on the basis of the character information obtained in step S1. Before the outline pattern is formed, while the bit of the thickened outline pattern is reversed (68), the AND with the shadow pattern is calculated, so that a shadow pattern 69 can be formed. In this manner as mentioned above, the bit maps of the filler pattern (51), outline pattern (55), and shadow patterns (65, 69) can be formed. Different colors can be individually designated or different pattern filler processings can be individually executed for the filler pattern, outline pattern, and shadow pattern by the drawing routine, so that a number of various kinds of modified characters which cannot be realized hitherto can be generated as shown in Fig. 9. Fig. 7 shows structures of a bit map pattern memory (to store the bit map pattern which is obtained by developing the scalable font), a filler pattern memory, an outline pattern memory, and a shadow pattern memory in both cases where there is a font cache and there is no font cache. In the character output apparatus having the font cache, in the case where there is a font cache, a font cache memory is reserved in the RAM 7. The bit map pattern memory, filler pattern memory, outline pattern memory, and shadow pattern memory are reserved in the font cache memory. In this instance, the memories for the modified character patterns are simultaneously reserved. The filler pattern information portion has a pointer to the filler pattern information portion, a pointer to the outline pattern information portion, and a pointer to the shadow pattern information portion and they are linked. In the case, however, where there is no surplus capacity in the RAM 7 and no font cache memory cannot be reserved, the bit map pattern memory, filler pattern memory, outline pattern memory, and shadow pattern memory must be reserved in the built-in RAM. In this case, however, it is effective to commonly use the bit map pattern memory and the filler pattern memory. That is, only the information portion exists in the filler pattern memory and the head address of the bit map pattern information portion is stored in the pointer to the filler pattern information portion. Consequently, the capacity of the RAM 7 can be saved.

Claims: A character pattern forming method comprising the steps of: storing a record indicating whether a type of filler pattern, a type of outline pattern, and a type of shadow pattern are designated; reserving (S4) a filler pattern memory; reserving (S6) an outline pattern memory if (S5) the type of outline pattern is designated; reserving (S8) a shadow pattern memory if (S7) the type of shadow pattern is designated; forming (S9) a filler bitmap pattern in the filler pattern memory by developing basic pattern data corresponding to one character code; forming (S9) an outline bitmap pattern in the outline pattern memory by using the filler pattern memory and the outline pattern memory if the type of outline pattern is designated; forming (S9) a shadow bitmap pattern in the shadow pattern memory by using the filler pattern memory and the shadow pattern memory if the type of shadow pattern is designated and the type of outline pattern is not designated; forming a shadow bitmap pattern in the shadow pattern memory, in parallel with the outline bitmap pattern forming step, by using the shadow pattern memory and the outline pattern memory if the type of outline pattern and the type of shadow pattern are designated; and controlling the output of a synthesized pattern by combining the bitmap patterns resulting from said forming steps. A method according to claim 1, wherein said method is carried out in a printer (7-11). A method according to any preceding claim, wherein said controlling step controls the output of a synthesized pattern in response to input of an output instruction. A method according to claim 3, wherein the output instruction is input from a host computer (2). A method according to any preceding claim, wherein the designated type include a type of hatching pattern. A method according to any preceding claim, wherein the designated type include color information. A method according to any preceding claim, wherein the filler pattern memory, the outline pattern memory and the shadow pattern memory are reserved in accordance with a character size. A method according to any preceding claim, wherein the designated type of outline pattern includes outline thickness information. A method according to any preceding claim, wherein the designated type of shadow pattern includes shadow direction information. A method according to any preceding claim, wherein the designated type of shadow pattern includes shadow length information. A character pattern forming apparatus comprising: means for storing a record indicating whether a type of filler pattern, a type of outline pattern, and a type of shadow pattern are designated; reserving means for reserving a filler pattern memory, an outline pattern memory if the type of outline pattern is designated and a shadow pattern memory if the type of shadow pattern is designated; forming means for forming a filler bitmap pattern in the filler pattern memory by developing basic pattern data corresponding to one character code, an outline bitmap pattern in the outline pattern memory by using the filler pattern memory and the outline pattern memory if the type of outline pattern is designated, a shadow bitmap pattern in the shadow pattern memory by using the filler pattern memory and the shadow pattern memory if the type of shadow pattern is designated and the type of outline pattern is not designated and a shadow bitmap pattern in the shadow pattern memory, in parallel with the outline bitmap pattern forming step, by using the shadow pattern memory and the outline pattern memory if the type of outline pattern and the type of shadow pattern are designated; and control means for controlling the output of a synthesized pattern by combining the bitmap patterns formed by said forming means. An apparatus according to claim 11, wherein said apparatus is a printer (7-11). An apparatus according to any of claims 11 and 12, wherein said controlling means controls the output of a synthesized pattern in response to input of an output instruction. An apparatus according to any of claims 11 to 13, wherein the output instruction is input from a host computer (2). An apparatus according to any of claims 11 to 14, wherein the designated type include a type of hatching pattern. An apparatus according to any of claims 11 to 15, wherein the designated type include color information. An apparatus according to any of claims 11 to 16, wherein the filler pattern memory, the outline pattern memory and the shadow pattern memory are reserved in accordance with a character size. An apparatus according to any of claims 11 to 17, wherein the designated type of outline pattern includes outline thickness information. An apparatus according to any of claims 11 to 18, wherein the designated type of shadow pattern includes shadow direction information. An apparatus according to any of claims 11 to 19, wherein the designated type of shadow pattern includes shadow length information. A computer program comprising software code portions adapted to perform all the steps of claim 1 when the program is executed on a computer. A computer program according to claim 21, wherein the program is executed on a printer. A computer program comprising software code portions adapted to perform all the steps of claim 3 when the program is executed on a computer. A computer program comprising software code portions adapted to perform all the steps of claim 4 when the program is executed on a computer. A computer program comprising software code portions adapted to perform all the steps of claim 5 when the program is executed on a computer. A computer program comprising software code portions adapted to perform all the steps of claim 6 when the program is executed on a computer. A computer program comprising software code portions adapted to perform all the steps of claim 7 when the program is executed on a computer. A computer program comprising software code portions adapted to perform all the steps of claim 8 when the program is executed on a computer. A computer program comprising software code portions adapted to perform all the steps of claim 9 when the program is executed on a computer. A computer program comprising software code portions adapted to perform all the steps of claim 10 when the program is executed on a computer.

Inventors: MOCHIZUKI YASUSHI, MOCHIZUKI, YASUSHI
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1993
Main classification: G06T11
IPC codes: G09G5, G06F3, G06T11