The present invention relates generally to the field of data processing. More specifically, the present invention relates to techniques for comparing and selecting text attributes, such as font, kerning, and size.
Most word processors allow users to select different fonts for displayed or printed text. Frequently, however, users are faced with the daunting task of selecting from literally hundreds of different fonts, with little more than a cryptic name, such as “Book Antiqua” or “Trebuchet MS,” to aid in the selection process. In many cases, a font must be first applied to a block of text in order to see what it looks like. Unfortunately, manually applying each available font the same block of text can be an extremely slow and tedious way to decide upon a font.
More recently, as illustrated in
Initially, the font names are too short to provide users with a representative sample of upper and lower case letters in the respective fonts. For example, the font name “Arial” only includes four unique letters and one upper/lower case combination. Accordingly, users may still be tempted to apply multiple fonts to a more representative sample of text in a document.
Moreover, because each of the font names is different, the user cannot see, for example, how a particular letter is rendered in one font verses another font, unless two simultaneously displayed fonts happen to include the same letter. In addition, conventional font preview mechanisms do not allow users to compare any two available fonts on the screen at the same time, but only those fonts that happen to be adjacent to one another in the order in which they are presented, typically alphabetically. Finally, existing preview systems are limited to fonts, but ignore other text attributes, such as size and kerning options.
Reference is now made to the figures in which like reference numerals refer to like elements. For clarity, the first digit of a reference numeral indicates the figure number in which the corresponding element is first used.
In the following description, numerous specific details of programming, software modules, user selections, network transactions, database queries, database structures, etc., are provided for a thorough understanding of the embodiments of the invention. However, those skilled in the art will recognize that the invention can be practiced without one or more of the specific details, or with other methods, components, materials, etc.
In some cases, well-known structures, materials, or operations are not shown or described in detail in order to avoid obscuring aspects of the invention. Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
In one embodiment, the fonts presented in the font preview menu 200 are a pre-selected subset of the available fonts. A user may specify his or her “favorite” fonts using any suitable technique. Alternatively, the system may determine a user's favorite fonts based, for example, on frequency of usage. In still other embodiments, the displayed fonts may represent an alphabetical listing (or other arrangement) of all available fonts according to the names of the respective fonts.
As an example,
Each rendering of the user-selected text 202 in a different font may be presented in a what-you-see-is-what-you-get (WYSIWYG) format, allowing the user to see exactly how the user-selected text 202 will appear in the document 204. As illustrated, the font preview menu 200 may float above the word processor or other text-editing application. In various embodiments, the renditions of the user-selected text 202 may be ordered alphabetically according to the names of the underlying fonts, by frequency of usage, or in other ways.
Unlike standard approaches, the user-selected text 202 may be chosen to include a representative sample of letters or characters to allow meaningful comparison of the various fonts. Moreover, because the same text is automatically rendered in multiple fonts, the user may compare how particular characters appear in each font, which is not possible using the conventional approach depicted in
In one implementation, the user may select a font by clicking on or otherwise selecting a corresponding rendition in the font preview menu 200 using the mouse or keyboard. In response, the selected font may be immediately applied to the user-selected text 202 within the document 204. In other words, the user-selected text 202 within the document 204 is changed from its original font to the font of the selected rendition.
Referring to
Different options for text attributes besides font (such as size or kerning) may also be automatically presented in a WYSIWYG format. For example, as shown in
Similarly, as shown in
Referring to
In one embodiment, the font preview menu 200 includes a comparison area 500 that may be used for side-by-side comparisons of any of the available fonts. The user can individually highlight or otherwise select renderings of the user-selected text 202 in different fonts from the font preview menu 200. In response to a particular command, such as a predefined keystroke, the renderings are copied (or moved) to the comparison area 500.
Unlike conventional approaches, the user does not need to apply the selected fonts to actual text to have them displayed in a “favorites” area at the top of the font listing. Indeed, the user may remain within the font preview menu 200, selecting fonts to compare side-by-side in the comparison area 500. Once the renderings of the user-selected text 202 are moved (or copied) to the comparison area 500, the user may select one of them to be applied to the user-selected text 202 within the document 204.
The above-described comparison feature may also be applied in the embodiment of
As illustrated, the font report 600 may indicate the name of each font in addition to its size. In certain embodiments, the font names may be rendered in their respective fonts. Alternatively, or in addition, the font report 600 may include the user-selected text 202 (not shown) rendered in the fonts currently in use within the document 204.
Referring to
In operation, the font control application 702 detects a user selection or other highlighting of text within the a document 204 being edited by a text-editing application 700. A copy of the user-selected text 202 is then acquired by the font control application 702 using standard techniques.
As described above, the font control application 702 generates the font preview menu 200 including multiple renditions of the user-selected text 202 using different fonts. When the user selects one of these renditions, the font control application 702 instructs the appropriate text-editing application 700 to change the font of the user-selected text 202 within the document 204 to the font of the selected rendition.
The process of instructing the text-editing application 700 to change the font may occur in a number of different ways. In one embodiment, the font control application 702 sends scripting commands 704 to the text-editing application 700 via AppleScrip™ or Visual Basic™, for example. An example of scripting commands for changing the font and size of user-selected text 202 within Microsoft Word™ is as follows:
These scripting commands 704 target Microsoft Word™ and then issue two visual basic commands to set the font and size. Of course, different applications or operating systems would use different scripting commands 704 as known to those of skill in the art.
Another method for communication entails injecting a piece of code into the text-editing application 700 and then issuing commands to that piece of the code to change the font of the user-selected text 202. Code injection is the process of forcing a piece of code to be loaded into a target process without the knowledge of that process.
Mac OS X™ provides the capability of communicating with a secondary process via apple events. This communication method allows a programmer to send any desired data to another process provided the process knows about the data coming to it. Every process knows how to respond to the “kGetAETE” and “kGetAEUT” of the kASAppleScriptSuite class of events. These events force the operating system to load all modules of code of type “osax” into its address space. The “osax” modules reside in a specific folder that the operating system knows about. Any time the font control application 702 wants to change the font of the target process, it first makes sure its code has been injected by sending the above apple events. The font control application 702 then sends a message via apple events to its injected code telling it to change the font to the one the user has chosen. After the injected code receives the “change font” message, it looks through all of the menus trying to find an item in the menu that matches the name of the font to be changed. If the font the user wants to change is found, the injected code sends an event to the text-editing application 700 telling it to choose that menu item. The text-editing application 700 then changes the current font to the user-chosen font.
The above-described process may also be used to change other attributes of the user-selected text 202, such as kerning. In addition, other techniques for communicating between the font control application 702 and the text-editing application 700 may be used as known to those of skill in the art.
One benefit of a separate font control application 702 is that configuration settings may be consistent across a plurality of text-editing applications 700. For example, a user's selection of favorite fonts, size ranges, or fonts to be compared within the comparison area 500 may be used in connection with each text-editing application 700. Thus, a user does not need to learn a different font selection interface for multiple applications 700 and does not need to individually configure each interface to have similar settings.
The foregoing process is further illustrated in
In block 808, the font control application (702) receives a user selection of one rendition of the selected text (202) from the font preview menu (200). In response, at block 810, the font control application (702) instructs the text-editing application (700) to change the font of the selected text (202) to the font of the selected rendition.
While specific embodiments and applications of the present invention have been illustrated and described, it is to be understood that the invention is not limited to the precise configuration and components disclosed herein. Various modifications, changes, and variations apparent to those of skill in the art may be made in the arrangement, operation, and details of the methods and systems of the present invention disclosed herein without departing from the spirit and scope of the present invention.
Embodiments of the invention may include various steps, which may be embodied in machine-executable instructions to be executed by a general-purpose or special-purpose computer (or other electronic device). Alternatively, the steps may be performed by hardware components that contain specific logic for performing the steps, or by any combination of hardware, software, and/or firmware.
Embodiments of the present invention may also be provided as a computer program product including a machine-readable medium having stored thereon instructions that may be used to program a computer (or other electronic device) to perform processes described herein. The machine-readable medium may include, but is not limited to, floppy diskettes, optical disks, CD-ROMs, DVD-ROMs, ROMs, RAMs, EPROMs, EEPROMs, magnetic or optical cards, propagation media or other type of media/machine-readable medium suitable for storing electronic instructions. For example, instructions for performing described processes may be transferred from a remote computer (e.g., a server) to a requesting computer (e.g., a client) by way of data signals embodied in a carrier wave or other propagation medium via a communication link (e.g., network connection).