Method and device for accessing shared character patterns, and resulting stored decompressible font structure
AssigneeHewlett-Packard Company
InventorsJoseph H. Bauman, Claude W. Nichols, III
Life of this patent
Estimating the term…
Abstract
The invented method, device and resulting font structure recognize that different fonts may have shared characters or common bit patterns. For example, if the character ".sub.-- " is the same in two different fonts, it only needs to be stored in memory once. It can then be referenced by both fonts. Specifically, the invention identifies shared characters or bit patterns, stores one of the shared characters or patterns at one location, and references that location in all fonts needing the character or pattern.
Claims8
A computerized method of compressing a plurality of fonts for space-saving storage in a memory device connected with an electronic printer controller, where each font includes a set of characters and where at least one character is common to more than one font, the method comprising:
- recognizing the characters that are common to more than one font;
- retaining in a memory device one copy of each character that is common to more than one font and omitting the remaining copies from the memory device;
- creating pointers in the memory device both to replace the omitted copies of characters that are common to more than one font and to identify the retained copies of characters;
- combining the characters from each font that are not common to more than one font with the respective pointers that replaced the omitted copies of characters from each font;
- and
- storing the combined characters and pointers in the memory device.
A method of printing characters from a plurality of fonts, where each character is defined by data stored in memory accessible by a printer, at least a portion of the data defining one character is common to more than one font, the portions of data common to more than one font are retained in only one, but not necessarily the same, font at predetermined locations in the memory device, where the data defining each character is stored sequentially in the memory and indexed by a table of sequential memory addresses which contain information identifying the beginning address of the data defining each character, and where the fonts that include the portions of data common to more than one font, but that do not include the retained portions, include pointers both to identify the predetermined locations in the memory device where the data portions are retained and to replace the data portions common to more than one font, the method comprising:
- selecting the font;
- identifying a character from the selected font to be printed;
- determining if the data defining the character to be printed is retained in the selected font;
- if so, retrieving the data and printing the character;
- but
- if not, reading the pointer replacing the data in the selected font, retrieving the data from the locations identified by the pointer and printing the character;
- and
- repeating the steps listed above until all the characters to be printed have been printed,
- where the step of determining if the data defining the character to be printed is retained in the selected font includes:
- recognizing the memory address in the table of memory addresses that indexes the data defining the character to be printed;
- comparing the contents of the memory address that indexes the data defining the character to be printed with the next sequential memory address in the table of memory addresses;
- and
- if there is no difference between the contents of the memory address that indexes the data defining the character to be printed and the next sequential memory address in the table of memory addresses, then concluding that the data defining the character to be printed is not retained in the selected font;
- but
- if there is a difference between the contents of the memory address that indexes the data defining the character to be printed and the next sequential memory address in the table of memory addresses, then concluding that the data defining the character to be printed is retained in the selected font.
A font compilation in a memory device, the compilation comprising:
- a first font having a plurality of characters defined by data stored in the memory device;
- a second font having a plurality of characters also defined by data stored in the memory device;
- at least one pointer in the second font identifying data that defines a portion of a character in the first font, where the data identified by the pointer also defines a portion of a character in the second font, the two character portions being common to the first and second fonts and being shared thereby, but where the shared character portion-defining data identified by the pointer is only stored once in the memory device.
Dependencies are inferred from the claim text.