DELIVERING AND FETCHING FONT INFORMATION

Abstract: An output device is enabled to obtain character descriptions for use in raster scanning characters which belong to a common character font. Character descriptions are stored in an external device which is linked to the output device by a communication channel. Character codes are received at the output device which identify characters to be outputted. A raster image of the characters to be outputted is set up. In the course of setting up the raster image, information corresponding to the characters codes is sent from the output device to the external device via the communication channel. In response to the character codes sent from the printer to the external device, corresponding character descriptions are sent from the external device to the output device via the communication channel.

Description: DELIVERING AND FETCHING FONT INFORMATION Background of the Invention This invention relates to delivering and fetching font information between a host computer and an output device, such as a printer. Characters of one style are organized into fonts. Roman style fonts, such as Times-Roman (see Appendix A, which shows the Times-Roman character set) and Helvetica include relatively small numbers of characters (the Roman letters, the arabic numbers, and symbols) . The amount of information needed to represent the characters of a Roman font is generally small enough to allow it to be stored within the memory of a conventional computer printer. Other fonts, for example, fonts for Asian languages, typically include so many characters or symbols that complete font information cannot conveniently be stored at one time within the printer's internal memory. One way to store the Asian font information is in an external hard disk connected to the printer. Another known approach is to store the font information in the host computer and use it to deliver non- scalable bit map character glyphs from the computer to the printer, over a single communication channel, as needed. Summary of the Invention In general, the invention features a method (and corresponding apparatus) which enables an output device, such as a printer, to obtain character descriptions for use in raster scanning characters which belong to a common character font. Character descriptions are stored in an external device that is linked to the output device by a communication channel (e.g., a secondary channel). Character codes are received at the output device that identify characters to be outputted. A raster image of the characters to be outputted is set up. In the course of setting up the raster image, information corresponding to the character codes is sent from the output device to the external device via the secondary communication channel. In response to the character codes sent from the output device to the external device, corresponding character descriptions are sent from the external device to the output device via the secondary communication channel. Embodiments of the invention include the following features. The external device comprises a computer having mass storage. The character codes are sent to the output device via an independent communication channel (e.g., a main, or primary, communication channel) . The main communication channel comprises either a parallel or a serial channel. The character codes received at the output device are embedded within page descriptions conforming to a graphical image description language (e.g., the PostScript® language) . The common font comprises a font in an Asian language. The output device comprises a printer. Among the advantages of the invention are the following. Fonts having large numbers of characters (e.g., Asian fonts) can be stored in the existing disk drive, or other mass storage device, of the host computer and character descriptions can be delivered to the printer quickly over the existing secondary communication channel on demand. This makes it practical and inexpensive to handle such fonts without additional equipment. Other advantages and features will become apparent from the following description and from the claims. Description Fig. 1 is a block diagram of a host computer and a printer. Fig. 2 is a block diagram of a portion of the printer .memory. Fig. 3 is a flow diagram of an interaction between a printer and a host during a font faulting procedure. Fig. 4 is a flow diagram of a font faulting program running in a printer. Fig. 5 is a flow diagram of a font faulting program running in a host computer. The PostScript® language is useful for printing with raster output devices, e.g., laser printers, that represent a printed page as a rectangular array of pixels (picture elements) . On a typical black-and-white output device, each pixel can be made either black or white; on certain devices, each pixel can be set to an intermediate shade of gray or to some color. By setting large groups of pixels to appropriate colors in appropriate combinations, one can produce an image that includes text and arbitrary graphical shapes. A PostScript® language description of a page is created on a host computer. The page description includes a bit-encoding of the characters, lines, curves, and other images that are to be printed on a page. The encoding is at a relatively high level and expressed in terms of abstract graphical entities rather than in terms of device pixels. The page description is downloaded to a printer over a primary read/write communication channel as a bit stream. To print characters on a page, the host computer informs the printer of the kind and style of characters to be printed. Typically, the information necessary to convert the bit stream into pixels is downloaded to the printer and stored in printer memory prior to downloading the page description bit stream. The printer uses the stored information to form and print the characters requested by the host computer. In Fig. 1, a page 10 of Asian characters 12 is generated by a PostScript® compatible laser printer 14 (e.g., DEClaser 1152 available from Digital Equipment Corporation of Maynard, MA, USA) based on information passed from a host computer 16 (e.g., a VAX/VMS computer system) via primary and secondary communication channels 18, 20, respectively. Computer 16 includes a microprocessor 22, an operating system 24, and an application program 26 which is able to generate PostScript® format page descriptions of pages to be printed. The page descriptions are sent to printer 14 on primary communication channel 18. The printer includes an interpreting microprocessor ("interpreter") 17 that responds to a page description by creating a pixel map in a raster memory 22 corresponding to the page to be printed. A print renderer 24 then renders the pixel representation on sheet 10 in a manner described in greater detail below. The interpreter 17 executes the PostScript® language according to syntax rules that enable the interpreter to carry out the required operations in the proper order, as well as to fit the pieces of the page description together to produce the desired results. The page description includes specialized bits, known as delimiters, which enable the interpreter 17 to organize the bit stream into groups of bits called objects. Some objects are ordinarily thought of as data, such as numbers, booleans, strings, and arrays. Other objects are ordinarily thought of as elements of programs to be executed, such as names, operators and procedures. Objects are executed sequentially by the interpreter according to predetermined rules. The effect of executing a particular object depends on that object's type, attributes, and value. For example, number objects (signed integers, real numbers, and radix numbers) are executed by copying them into a section of printer memory 19 known as the operand stack 30 (Figure 2) . Executing a name object (any group of bits, not including delimiters, that cannot be interpreted as a number object) causes the interpreter to search for the name object in a section of printer memory known as the dictionary stack 32, that contains a list of pointers to different dictionaries, and to fetch and execute, from the appropriate dictionary (i.e., a block of printer memory 36) , a value associated with the name object. Executing an array (otherwise known as a procedure) , which consists of a group of objects, causes the objects in the array to be executed sequentially. Executing an operator object causes the interpreter to perform a built-in action, the rules of which are stored in printer memory under the associative names "SYSTEMDICT" 36 or "GLOBALDICT" 38. The built-in actions include adding two numbers or changing a section of raster memory. Characters are organized in fonts (i.e., complete assortments of type of one style) . A font for use with a PostScript® interpreter is prepared in the form of a PostScript® font program on the host computer. The font program is typically downloaded to the printer and executed by the interpreter to generate a font dictionary that is stored in the dictionary stack 32 of printer memory 19. In the page description characters are represented by coded sequences of bits. Appendix B shows an encoding scheme used in the PostScript® language. There are different types of PostScript® fonts some of which, allow programmers to specify a procedure named BuildChar to render a character. The procedure renders each character by fetching its corresponding character description from printer memory or some other source (e.g., a hard disk connected to the printer, a font cartridge, or a host computer) and raster-converts them into raster images (i.e., pixel representations) in raster memory 22. Character descriptions can take a number of different forms. For example, the character descriptions may be PostScript® Type 1 charstrings (containing encoded lines and curves to construct the outline of a character; for a more detailed description see PostScript® Language Reference Manual Second Edition incorporated by reference) . Other character descriptions may take the form of other data which the printer can use to construct a character (e.g., a PostScript® program or an encoded sequence of curves and lines) . The character descriptions may also be bitmaps of the raster-converted characters (in which case, the printer would send a request to the host containing both the character code and the size of the bitmap, and the computer would rasterize the character and send the resulting bitmap to the printer) . All fonts (except those with a FontType of 0) are considered base fonts that contain individual character descriptions. Composite fonts are combinations of base fonts organized hierarchically. The font at the top level of the hierarchy is the root font. Fonts at a lower level of the hierarchy are called descendent fonts. The composite font facility supports the use of very large character sets, such as those for Asian languages. For more information see the Tutorial on Composite Fonts, available from the Adobe Systems Developers' Association, Adobe Systems Incorporated, of Mountain View, CA, U.S.A., incorporated by reference. •The interpreter may temporarily store the results from executing a character description in font cache 40. The interpreter finds and reuses those stored results when the same character is to be printed again. The font cache is usually large enough to accommodate all of the distinct characters in a page description. Using the font cache is typically hundreds of times faster than again converting a character description each time the character is to be rendered. In some instances the information representing the character descriptions of a font is too voluminous to be stored conveniently in printer memory 19, for example Asian fonts may contain more than 13,000 characters. The additional storage may be provided by attaching an auxiliary disk drive to the printer. In that scheme the Asian character descriptions are stored on the disk and only the indexes to the Asian character descriptions are loaded into printer memory. When a particular character description is needed by the interpreter, the interpreter may issue a file read request to retrieve the character description from the disk. In the invention, to handle the information required to print large (e.g., Asian) fonts, the printer and the host communicate font information via the available secondary communication channel 20. A PostScript® client mode font faulting program 42 is downloaded to printer 14 via the primary communication channel 18 when the initial font information is loaded into printer memory (i.e., the appropriate BuildChar procedure for rendering the desired style of characters) . As shown in Fig. 3, when the BuildChar procedure is called by the interpreter, it opens communication channel 20 between the printer and the host computer (50) , which provides the printer with additional access to the character descriptions stored in disk memory 29 of the host computer (52) . A server program 31, running on the host computer, returns the requested character descriptions to the printer (58) . The character descriptions are pre-processed data stored in the memory of the host computer (e.g., character descriptions in Adobe Type 1 format) . If necessary (54) , the server program can also convert the character descriptions from other font formats before sending them to the printer (56) . The character description in this form can be scalable outline descriptions or scan-converted bitmaps. When an Asian font handled by the font faulting and server programs is invoked by a page description, instead of searching through the dictionary in printer memory for the character description associated with a character name, the interpreter may request the character description by name through the BuildChar procedure over the second communication channel 20. The server program responds by opening and reading from an appropriate character description data file, or converting from some other form of font data, and returning the description on channel 20. The interpreter converts the character description, in the usual way, into a pixel representation in raster memory. As shown in Figure 4, the client mode font faulting program running in the interpreter of printer 16 may execute the following sequence of steps in order to choreograph the retrieval of character descriptions from the host computer. First the interpreter receives the character name from the page description bit stream downloaded by the host computer on communication channel 18 (100) . The communication channel 20 is then opened as a write-only file (102) . The characters ">CS" are written to communication channel 20 to signal a request for font information to the host computer (104) . Next the last two characters of the character name are converted into hexadecimal notation and the converted characters are written to communication channel 20 to represent the row number of the encoded character description which is stored on the host computer (106) . The two character code, associated with the character name, is then converted into hexadecimal notation and the converted code is written to communication channel 20 to represent the column number of the encoded character description which is stored on the host computer (108) . The character stream representing the character description downloaded by the host computer on communication channel 20 is then read into the memory location associated with CS_BUF until the End of File (EOF) indicator "->" is received (110) . Finally, the character description associated with CS_BUF is executed by the interpreter as a conventional character description (112). Appendix B, incorporated by reference, contains a PostScript® language version of the client mode program running in the printer. As shown in Figure 5, the server program running on the host computer may comprise the following steps. First, port 21 (Figure 1) is enabled to be capable of read/write input/output (I/O) operations (120) . If port 12 is disconnected within 1 second of an I/O operation, stall 1 second and go to step 1 (122) . Next, channel 20. is opened (124) . The incoming bit stream is then copied from channel 20 into a section of memory labeled MSG_BUFFER (126) . A pointer is then set to the first instance of " Λ >" in MSG_BUFFER (128) . The delimiter "<" is stripped from character in MSG_BUFFER, if present (130) . If the first two characters in MSG_BUFFER are "CS" then go to step 134, otherwise go to step 126 (132) . The character description index.file stored in disk memory 29 is then opened (134). The row and column information stored in MSG_BUFFER are obtained as well as the index to the character description according the entry "index[row * 188 + column]" (136). The character description data file is then opened (138) . The retrieved index from the index file is used to obtain the requested character description from the character description data file and store it in CS_BUF (140) . The EOF delimiter "->" is then attached to the end of the character description in CS__BUF (142). The character description in CS_BUF is downloaded to the printer (144) . If additional bits are received on channel return to step 126; otherwise disconnect communication channel 20 (146) . Appendix C, incorporated by reference, contains a 11 C" language version of relevant portions of a server mode program running in the host computer. Depending on how the BuildChar procedure is written, character descriptions can exist in several different forms. The invention is compatible with the following forms of character descriptions. A PostScript® Type 1 charstring is an encrypted sequence of unsigned 8-bit bytes that encode integers and commands. It can be passed directly to PostScript®'s internal rasterizer (Type l rasterizer) to render a character. The BuildChar procedure sends a request containing the character code and font information to the host computer over the secondary communication channel. Then it opens the secondary channel for reading and waits for the charstring returned from the host. Upon receiving the request, the computer retrieves the charstring stored on the computer's disk memory and sends it back to the printer over the secondary communication channel. The BuildChar procedure receives the charstring and passes it to the Type 1 rasterizer for rendering the character. In addition to reading from the disk, the computer can also construct the charstring on-the-fly from other font formats (e.g., TrueType) . For a detailed description of PostScript® Type 1 charstrings see Adobe type 1 Font Format Version 1.1 by Adobe Systems Incorporated. A PostScript® Type 3 font defines character shapes using ordinary PostScript® language operators and procedures. To render a character, the BuildChar procedure executes PostScript® codes to construct the character's outline. Normally the PostScript® codes for rendering individual characters are stored in PostScript® dictionaries. However, in the invention, the BuildChar procedure is written to import the character-rendering PostScript® codes from an outside source. The BuildChar procedure of the font program sends a request to the host computer over the secondary communication channel. The request contains the character code and the font file information. Then it opens the secondary channel for reading and waits for the PostScript® code to be returned from the host computer. Upon receiving the request, the computer will construct the PostScript® character description and forward it to the printer over the secondary communication channel. The computer can construct the character-rendering PostScript® code by retrieving information stored on disk memory, or converting .on-the-fly from another format. The BuildChar procedure receives the PostScript® code and passes it to the PostScript® interpreter for execution. For a detailed description of PostScript® Type 3 font programs see PostScript® Language Reference Manual, Second Edition, Adobe Systems Incorporated of Mountain View, CA, U.S.A., incorporated by reference. A Type 3 font program can render a character by using.the PostScript® operator "imagemask" to paint a raster-converted bitmap to the printer's raster memory. The PostScript® operator imagemask paints a sampled image onto the current page using the current color. The sampled image is a rectangular array of 1-bit samples that are used to control where to apply paint with the current color and where not to apply paint. To render a character according to the invention, the BuildChar procedure of the font program sends a request to the host computer over the secondary communication channel. The request contains the character code, the font name and typeface, and the size of the bitmap to be provided by the host computer. The BuildChar procedure then opens the secondary channel for reading and waits for the bitmap to be forwarded from the host. Upon receiving the request the computer will set up a block of memory and call its graphics routines to draw the character into memory in the requested size. The computer formats the bitmap in a suitable PostScript® format and forwards the data to the printer over the secondary communication channel. The BuildChar procedure receives the bitmap data, stores it in a string and calls the imagemask operator to render the character. Other embodiments are within the scope of the claims. For example, the invention can be used with any raster output device having two or more read/write communication ports, and is not restricted to PostScript® printers. Appendix A Standard Roman Character Set ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz&O 123456789 iCAAAAAAςDέέEέfϊϊiLN ( E000000§ϊU UUUΫΫ2a£daaέέa9έeeeafiflfιϊlιμl ioeόόδόδøδ{β ύUϋuyyi£¥ $ π © ( g )@ «o t §ϊ * ! i ?i ..<, ii *» » »» • • ' <>«»()[]{ }i/\ — _> A " • #% C 1 /4 3 /4 1 /2 = - + X~<±>÷-l° A /-! 123

Claims: What is claimed is: 1. A method for outputting on an output device characters which belong to a common character font comprising storing character descriptions of each of the characters of a common character font in an external device which is linked to the output device by a communication channel; receiving, at the output device, character codes which identify characters to be outputted, setting up a raster image of the characters to be outputted, in the course of setting up the raster image, sending information corresponding to the character codes from the output device to the external device via the communication channel, and in response to the character codes sent from the output device to the external device, sending corresponding character descriptions from the external device to the output device via the communication channel. 2. The method of claim 1 wherein the external device comprises a computer having mass storage. 3. The method of claim 1 wherein the character codes are " sent to the output device via a second independent communication channel. 4. The method of claim 3 wherein the second communication channel comprises either a serial or a parallel channel. 5. The method of claim 1 wherein the character codes received at the output device are embedded within pag descriptions conforming to a graphical image description language. 6. The method of claim 5 wherein said graphical image description comprises the PostScript® language. 7. The method of claim 1 wherein the common character font comprises a font in an Asian language. 8. The method of claim 1 wherein the output device comprises a printer. 9. A method for printing characters which belong to a common Asian character font on a PostScript® printer comprising storing character descriptions in a host computer which is linked to the printer by a primary communication channel and a secondary communication channel; sending a PostScript® page description from the host computer to the printer via the primary communication channel, the page description including character codes which identify characters to be printed, setting up, in the printer, a raster image of the characters to be printed, in the course of setting up the raster image, sending character codes from the printer to the host computer via the secondary communication channel, in response to the character codes sent from the printer to the host computer, sending corresponding character descriptions from the host computer to the printer via the secondary communication channel. 10. Apparatus for outputting on an output device characters which belong to a common character font comprising storage for character descriptions, the storage located in an external device, a communication channel linking the output device to the external device, a port on the output device for receiving character codes which identify characters to be outputted, a character setter for setting up a raster image of the characters to be outputted, means for sending information corresponding to the character codes from the output device to the external device via the communication channel, means for sending corresponding character descriptions from the external device to the output device via the communication channel. 11. The apparatus of claim 10 wherein the external device comprises a computer having mass storage. 12. The apparatus of claim 10 further comprising a second independent communication channel linking the output device to the external device.

Inventors: KAM CHI SUM, KAM, CHI, SUM
Applicants: DIGITAL EQUIPMENT CORP, DIGITAL EQUIPMENT CORPORATION
Application year: 1994
Main classification: G06F3
IPC codes: B41J2, B41J5, G06F3, G06K15