摘要:
A method and computer-readable medium are provided for laying out footnotes. Each footnote includes a footnote reference and corresponding footnote text. According to the method, an attempt is first made to lay out one or more footnotes such that each of the references and the corresponding text all fit completely within one page. If such a layout cannot be made, an attempt is may to lay out each of the footnotes such that all of the reference marks fit on the page and all but one of the corresponding note text fits completely on the page. If such a layout cannot be made, an emergency layout may be generated.
摘要:
A method and computer-readable medium are provided for optimized paragraph layout. According to the method, a line-by-line paragraph layout is generated determine a maximum penalty for a paragraph. One or more layout nodes may be generated that include data representing a possible layout of the paragraph to a point within a backing store and identifying any changes to a geometry of the page caused by the layout of the paragraph defined by the layout node. A penalty is also calculated for each of the layout nodes. Each layout node that has a penalty less than the maximum penalty calculated during the line-by-line formatting processing is added to the node pool. This process repeats until only a single layout node remains in the node pool that represents the entire paragraph of text.
摘要:
Architecture of one or more algorithms for autofitting objects with non-trivial geometries in documents. The algorithms autofit rectangular objects (such as floaters), when the objects contain both left and right aligned objects, autofit tables, determine correct sizes of a parent object and its child object when the width of the parent object is unknown (referred to as an auto-width), and the width of the parent's child object is expressed in percentages of the parent object width. A two-pass algorithm determines the best (or optimal) sizes of margins, borders, and paddings of objects where any combination thereof can have fixed width, auto width, and/or percentage-expressed width. Additionally, the algorithms can recursively calculate the optimal widths of objects inside other objects, where the outer object width is undefined. The algorithms can process an unlimited number of nesting levels.
摘要:
An approach for positioning a floating object in a workspace of an electronic document is disclosed herein. To accomplish this, the workspace is divided into a plurality of available portions in which floating objects may be positioned. For example, these available portions represent geometrical areas within the workspace that do not include obstacles, such as absolutely positioned objects and other floating objects. The available portions are then evaluated against a plurality of undesirable positioning characteristics in order to determine an optimal position for the floating object within the workspace. The optimal position is then determined to be either a location in the workspace that does not result in any of the undesirable characteristics or, alternatively, a location having the most tolerable of the potentially resultant undesired characteristics.
摘要:
Architecture of one or more algorithms for autofitting objects with non-trivial geometries in documents. The algorithms autofit rectangular objects (such as floaters), when the objects contain both left and right aligned objects, autofit tables, determine correct sizes of a parent object and its child object when the width of the parent object is unknown (referred to as an auto-width), and the width of the parent's child object is expressed in percentages of the parent object width. A two-pass algorithm determines the best (or optimal) sizes of margins, borders, and paddings of objects where any combination thereof can have fixed width, auto width, and/or percentage-expressed width. Additionally, the algorithms can recursively calculate the optimal widths of objects inside other objects, where the outer object width is undefined. The algorithms can process an unlimited number of nesting levels.
摘要:
A computer-implemented method and computer-readable medium are provided for providing page and table layout services. According to the method, a layout manager program provides layout services to client application programs. The layout manager receives requests from client application programs to format document content. In response to such requests, the layout manager performs one or more callback operations to the client application to retrieve portions of the document to be laid out. Once the portions of the page to be laid out have been retrieved through the callback operations, the layout manager lays out the portions of the document and notifies the client application that the layout is completed. The client application can then query the layout manager for the formatting result.
摘要:
A method and system for optimizing the horizontal spacing of superscripts and subscripts in open type font designs is disclosed. The system includes a module for vertically aligning and spacing characters and a module for horizontally aligning characters having differing baselines in accordance with cut-in information stored in font tables corresponding to each individual character in the font. This additional horizontal spacing adjustment capability provides for optimum placement of character glyphs having differing baselines, e.g., superscript or subscript. The method includes placing a first/next character on a baseline, retrieving a next adjacent character, determining whether a cut-in associated with one or both of the characters can be applied between the two characters, and then applying the appropriate cut-in. Ascertaining whether a cut-in may apply may be accomplished by evaluating relative positions of adjacent glyph bounding boxes.
摘要:
Embodiments relate to systems and methods for formatting a set of expressions in a document. In embodiments, the systems and methods provide the ability to format a set of expressions by aligning expressions or parts of expressions to each other or to the margins of the document, while also supporting breaking of one or more expressions into multiple parts to be placed on different lines. Breaking can include breaking in places requested by a user or breaking in places that are automatically determined to fit the expressions between the margins of a document.
摘要:
A computer-implemented method and computer-readable medium are provided for providing page and table layout services. According to the method, a layout manager program provides layout services to client application programs. The layout manager receives requests from client application programs to format document content. In response to such requests, the layout manager performs one or more callback operations to the client application to retrieve portions of the document to be laid out. Once the portions of the page to be laid out have been retrieved through the callback operations, the layout manager lays out the portions of the document and notifies the client application that the layout is completed. The client application can then query the layout manager for the formatting result.
摘要:
A character within a font is enlarged to a desired size by first determining whether the font contains existing or predefined variants of the character having the desired size. If no appropriately sized variant exists, the enlarged character is assembled from a plurality of component glyphs that are stored with the font, wherein the component glyphs include an extender that may be duplicated within the assembled character in order to achieve the desired size. In one embodiment, the font includes tables containing records of the enlarged variants for a particular character, as well as part records for the component glyphs used to assemble the enlarged character.