摘要 |
A method and system for causing editable text to substantially occupy an associated text frame. The system and method operate in a standard text editing environment of a text editing application program. The height of the editable text is altered, without the need for user interaction, directly in the standard text editing environment.A fullness ratio is determined, which may be defined as a ratio of the height of the editable text to the height of the text frame. If the fullness ratio is not within a predetermined range of values, the height of the editable text will be altered. An ideal height for the editable text is determined that will cause the fullness ratio to be within the predetermined range of values. The ideal height is a function of the font size of the characters that make up the editable text. So, an ideal font size must be determined, that when applied to the editable text, will cause the fullness ratio to be within the predetermined range of values.To determine the ideal font size, a theoretical font size is determined. The theoretical font size may be described as a "best guess" at the ideal font size. The theoretical font size is applied to the editable text and the fullness ratio is again determined. If the fullness ratio is not within the predetermined range, another theoretical font size is determined and the method is repeated. When the fullness ratio is determined to be within the predetermined range, the theoretical font size is considered to be the ideal font size. The ideal font size is applied to the editable text, causing the editable text to substantially occupy the text frame.
|