Patent Document ID: 7770111
Application ID: 11018917

Base Claim:
1. A method for laying out a paragraph of text on a page, the method comprising: creating a node pool for storing a plurality of nodes, the node pool comprising a current node having a minimum amount of content associated with the paragraph; generating at least one layout node that corresponds to the current node plus each possible layout of a line of the text associated with the paragraph, wherein generating the at least one layout node comprises identifying all possible breaks for the line of the text following the current node; identifying any changes to a visible geometry of the page caused by a possible layout of the paragraph defined by the at least one layout node; storing the identified changes to the geometry of the page caused by the possible layout of the paragraph in a memory associated with the at least one layout node; producing a line-by-line paragraph layout for the text to determine a maximum penalty for the paragraph, wherein producing the line-by-line paragraph layout for the text to determine the maximum penalty for the paragraph comprises: iteratively processing the text to locate a best possible break for each line of the text, calculating a total penalty for the line-by-line paragraph layout by summing a line penalty for each line of the text in the paragraph, identifying any figures that are on the page containing the paragraph after producing the line-by-line layout of the paragraph, and removing all layout nodes from the node pool that cause any of the figures identified during the line-by-line layout to be pushed to a next page; calculating a node penalty for the generated at least one layout node, wherein calculating the node penalty comprises utilizing a hyphenation quality factor when the generated layout nodes include a hyphenation parameter; determining when a first hyphenation has a better hyphenation quality than a second hyphenation, wherein at least one of a plurality of factors are used to determine the better hyphenation quality, wherein the first hyphenation is assigned to the hyphenation parameter when the first hyphenation has the better hyphenation quality than the second hyphenation and the second hyphenation is assigned to the hyphenation parameter when the second hyphenation has the better hyphenation quality than the first hyphenation; determining whether the plurality of nodes in the node pool exceed in quantity a threshold number of nodes; in response to determining that the plurality of nodes in the node pool exceed in quantity the threshold number of nodes, removing higher-penalty layout nodes from the node pool; adding each layout node to the node pool that has the node penalty less than the maximum penalty for the paragraph; removing the current layout node from the node pool; and repeating the generating, calculating, adding, and removing operations until only a single node remains in the node pool that represents the paragraph of text.

---

Claim 2:
2. The method of claim 1 , wherein calculating the node penalty for each of the generated nodes comprises: defining an acceptable typography limit; determining whether the line penalty for each line of the text exceeds the acceptable typography limit; and in response to determining that the line penalty for each line of the text exceeds the acceptable typography limit, calculating the line penalty for each line of the text utilizing a second penalty function not based on typographic rules.