摘要:
Objects are scaled by scaling properties that affect a physical layout of the object. A scaling factor is determined and each of the determined properties for an object are scaled based on the scaling factor. For example, when scaling a table, properties such as width, height, border widths, padding, text spacing, margins, indents, font size, cells, columns, and the like, may be scaled based on the scaling factor. Determined properties of any objects that are contained within an object are also scaled based on the scaling factor. The scaling process is repeated for each object that is contained within an object. After scaling, a user may still interact with the object in the same manner as before scaling. One or more ranges may be selected within a document where scaling is desired that include all/portion of the document.
摘要:
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.
摘要:
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.
摘要:
A computer-implemented method and computer-readable medium are provided for generating a multiple column layout. According to the method, a layout is defined that includes two or more columns and one or more spans that extend across two or more of the columns. Each span is defined as being either content defined or height defined. Content is laid out from a document in each span that is height defined until a defined height is reached. Content is laid out from the document in each span that is content defined until a specified point in the content is reached. When all content or height defined spans have been laid out, the remaining portion of the content is laid out across all of the columns.
摘要:
Architecture that facilitates the calculation of the final margins and positions of all objects in one formatting pass, without the need to reformat an object in the margin neighborhood. Clearance objects, float objects, and empty objects are taken into account. The one-pass algorithm computes the positions of objects on the document due to collapsing margins, determines the sizes of the resulting collapsed margins, and correctly places empty objects, floats, and clearance objects in the document. Clearances due to objects that belong to the neighborhood are processed as well as clearances due to objects outside of the neighborhood.