Method for placing text around polygons and other constraints
First Claim
1. A computer-readable medium storing computer-executable instructions for performing the steps of:
- receiving a first width, a character position, and a vertical position associated with a candidate rectangle;
receiving parameters defining a constraint that intersects with the candidate rectangle;
fitting a first text string to the candidate rectangle;
determining a first height associated with the first text string;
conducting a preliminary text assignment to identify an unobstructed span corresponding to the candidate rectangle, the unobstructed span associated with a second height;
comparing the second height to the first height;
if the second height is equal to the first height, determining whether a second text string fitted to the unobstructed span ends in a delimiter, and if the second text string ends in a delimiter, assigning the second text string to the unobstructed span;
if the second height is greater than the first height, declaring the candidate rectangle invalid and advancing the vertical position by a predetermined amount; and
if the second height is less than the first height refining the unobstructed span.
2 Assignments
0 Petitions
Accused Products
Abstract
An object-oriented text layout engine that implements an efficient two-pass text placement procedure. The interface allows the text layout engine to receive parameters that define the document space into which text is to be placed. The interface also allows the text layout engine to receive parameters that define one or more constraints around which the text is to be placed. The text layout engine then places the around the constraint within the document space and returns the text layout to the client program. The text layout engine may be configured in three components, a Fill Constrained Display Rectangle (FCDR) module, a Format Line module, and a Compute Unobstructed Spans (CUS) module. The FCDR module controls the operation of the text layout engine, interacts with the client program, and calls the Format Line and CUS modules as necessary. The CUS module receives a set of parameters that define a candidate rectangle and a constraint that may intersect the candidate rectangle. The CUS module breaks the candidate rectangle to avoid the constraint and returns zero or more unobstructed spans that do not intersect the constraint. The Format Line module receives text characters and a span definition and assigns the text characters to the span.
111 Citations
20 Claims
-
1. A computer-readable medium storing computer-executable instructions for performing the steps of:
-
receiving a first width, a character position, and a vertical position associated with a candidate rectangle; receiving parameters defining a constraint that intersects with the candidate rectangle; fitting a first text string to the candidate rectangle; determining a first height associated with the first text string; conducting a preliminary text assignment to identify an unobstructed span corresponding to the candidate rectangle, the unobstructed span associated with a second height; comparing the second height to the first height; if the second height is equal to the first height, determining whether a second text string fitted to the unobstructed span ends in a delimiter, and if the second text string ends in a delimiter, assigning the second text string to the unobstructed span; if the second height is greater than the first height, declaring the candidate rectangle invalid and advancing the vertical position by a predetermined amount; and if the second height is less than the first height refining the unobstructed span. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
-
-
16. In or for a computer system, a method for placing text around constraints the steps of:
-
receiving a first width, a character position, and a vertical position associated with a first candidate rectangle; receiving parameters defining a constraint that intersects with the first candidate rectangle; fitting a preliminary text string to the first candidate rectangle; determining a first height associated with the preliminary text string; identifying a first set of unobstructed spans corresponding to the candidate rectangle by excluding from the candidate rectangle a portion of the candidate rectangle that intersects with the constraint; fitting a first set of text strings to the first set of unobstructed spans; determining a second height associated with the first set of text strings; comparing the second height to the first height; if the second height is equal to the first height, assigning the first set of text string to the first set of unobstructed spans and aligning a baseline associated with the first set of text strings; if the second height is greater than the first height, declaring the first candidate rectangle invalid and advancing the vertical position by a predetermined amount; and if the second height is less than the first height, defining a second candidate rectangle having the first width and the second height, identifying a second set of unobstructed spans corresponding to the second candidate rectangle by excluding from the second candidate rectangle a portion of the second candidate rectangle that intersects with the constraint, fitting a second set of text strings to the second set of unobstructed spans, determining a third height associated with the second set of text strings, comparing the third height to the second height, if the third height is equal to or less than the second height, assigning the second set of text strings to the second set of unobstructed spans for each unobstructed span of the second set of unobstructed spans by, determining whether a text string fitted to an unobstructed span ends in a delimiter, if the fitted text string ends in a delimiter, assigning the text string to the unobstructed span, and if the fitted text string does not end in a delimiter, assigning no text to the unobstructed span, and if the third height is greater than the second height, declaring the second candidate rectangle invalid and advancing the vertical position by a predetermined amount. - View Dependent Claims (17, 18)
-
-
19. A computer-readable medium storing computer-executable instructions for implementing a text layout engine comprising:
-
a first module for receiving text characters, constraint parameters, a page width, and a character position from the client module and returning to the client module the text characters placed around the constraint in unobstructed spans with the text characters fitted to each unobstructed span ending in a delimiter; a second module for receiving the page width and the character position from the first module, fitting a portion of the text characters to a candidate rectangle corresponding to the page width and the character position, and returning to the first module a height associated with the text characters fit to the candidate rectangle; and a third module for receiving the candidate rectangle and the constraint parameters from the first module, identifying unobstructed spans corresponding to the candidate rectangle by excluding from the candidate rectangle a portion of the candidate rectangle that intersects with the constraint. - View Dependent Claims (20)
-
Specification