Browse Prior Art Database

Justification Approach for a Two Pass Printer Text Formatter

IP.com Disclosure Number: IPCOM000048294D
Original Publication Date: 1982-Jan-01
Included in the Prior Art Database: 2005-Feb-08
Document File: 4 page(s) / 53K

Publishing Venue

IBM

Related People

Daniels, PR: AUTHOR [+2]

Abstract

In text formatting for impact or other printers, the text formatter may operate via two passes: a scan pass and an output pass. During the scan pass, a line of text is preprocessed in that certain parameter values are calculated, data is reorganized, and exception conditions are detected. During the output pass, the line is transformed into printer control commands and is buffered for subsequent transmission to the printer control system.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 45% of the total text.

Page 1 of 4

Justification Approach for a Two Pass Printer Text Formatter

In text formatting for impact or other printers, the text formatter may operate via two passes: a scan pass and an output pass. During the scan pass, a line of text is preprocessed in that certain parameter values are calculated, data is reorganized, and exception conditions are detected. During the output pass, the line is transformed into printer control commands and is buffered for subsequent transmission to the printer control system.

One of the functions performed by the formatter is justification, i.e., uniform expansion of interword spaces for the purpose of eliminating all or part of the white space between the rightmost graphic in a field and the right edge of the field. The parameters required to perform the justify process are calculated during the scan pass and are temporarily stored for later use by the output pass. These parameters are (1) residue - length of the trailing white space, (2) justify space count - the number of interword spaces which may be expanded, and (3) field adjust - the distance to move the horizontal pointer after the justify process to place it at the beginning of the next field to be justified.

For some text formatting operations, text formatters are required to have the potential for multicolumn justification, i.e., independent justification of multiple fields in a single line. Each of these fields require calculation and temporary storage of the three parameters specified previously. While this operation is no more complex then for a single field, the storage required for saving the justify parameters between the scan and output passes presents a problem since this storage, at 3 to 6 bytes per field, consumes a significant portion of the total system RAM (random-access memory) storage as the number of justified fields increases. A standard solution to the storage problem is to limit the number of supported fields so that parameter storage is minimized. However, this solution is not completely acceptable since it can significantly limit the formatter's versatility and it raises the questions as to what the maximum field count should be and what action should be taken if this limit is exceeded.

The storage problem posed by multicolumn justify is solved by utilizing temporary storage which is "free" in the sense that it is already available in the system irrespective of justify requirements: This storage is the formatter's input buffer. It is utilized to solve the problem by reallocating the storage which contains the justify text field (JTF) control sent by the host to specify a justify right edge and justify percent to temporary storage for the three justify parameters required for each field. The ability to use the storage occupied by characteristics of the controls: (1) the justify right edge parameter may be discarded after the field is scanned, and (2) the control is present at the beginning of each field to be justified.

The for...