Patent ID: 7120868

Claim:
A system for laying out a document, the system comprising: a general purpose computing device; and a computer program comprising program modules executable by the computing device, wherein the computing device is directed by the program modules of the computer program to, create a plurality of alternate versions of content; and automatically format said alternate of versions of content to fit a display, wherein said module to automatically format said alternate versions of content to fit a display, comprises sub-modules for: inputting a tree data structure used to arrange said alternate versions of content into content nodes, and a rectangular region wherein content is to be displayed; traversing said tree data structure, calling an appropriate layout engine when content nodes are encountered to determine the size of a rectangular pane of content within said rectangular region; and once the pane sizes are determined for each content node, rendering content in each pane, wherein said sub-module for rendering content in each frame comprises sub-modules for: inputting pane size, alternate versions of content, and attributes of the content to be rendered; evaluating each version of text content to find the best line breaking solution for each version of alternate content, providing a text goodness score for each version; evaluating each version of image content to find the best figure placement solution, providing a figure goodness score for each version of figure placement; determining the best combinations of alternate versions of text and figure content using a layout goodness score based on said text and figure goodness scores; and rendering the text and figure combination with the best layout goodness score in the pane.