The present invention is related generally to data processing means for formatting human-perceptible elements of electronic information for visual output. More particularly, the present invention is related to data processing means for automatically adjusting the size of text before it is rendered on a display device.
Many commentators around the world attribute the dawn of the “information age” to the development of wide area computer networks—particularly the Internet. Today, the Internet is a wide area network connecting thousands (if not millions) of disparate networks belonging to private industry, educational institutions, and government organizations. See, e.g., IBM Dictionary of Computing 354 (10th ed. 1993). The Internet, though, existed for many years in relative obscurity, relegated to serving the esoteric whims of academia or the highly specialized needs of the military.
It was the World Wide Web that ultimately propelled the Internet into mainstream culture. The World Wide Web, commonly known simply as “the web,” is the progeny of markup languages (more specifically, hypertext markup languages) and the Internet. The origins of the World Wide Web can be traced to a relatively simple project designed to facilitate access to electronic information scattered about in computers throughout the European Organization for Nuclear Research (CERN).
The scope of information available on the web has evolved considerably since its early days, but the core technical underpinnings have remained relatively unchanged. In short, the most basic components of the web are documents, web servers, and web browsers.
In simplest form, each document available in the web (commonly referred to as a “web page”) consists of two types of data—“content” and “code.” “Content” is the substantive information that the author of a document wants to make available to readers. Generally, content includes text and images, but also may include audio and other media. “Code” generally refers to markup language “tags” that specify the author's preference for the layout and format of the content, but also may refer to scripts and other programmable elements embedded in the document. An author may use tags to specify the format (i.e. font face, size, etc.) of each element in a document, or may use a “style sheet” to specify the format of any or all elements in a document. A style sheet is comprised of one or more “rules” that specify the properties of a given element, including the size of text elements.
The web implements a request/response architecture, wherein the web browsers request documents from the web servers, and the web servers respond by sending the data in the requested document over the network to the web browsers. When a web browser receives web page data from a web server, the web browser processes the tags in the data to determine how the content should be rendered on a display device.
It is not uncommon, though, for content to be illegible or difficult to read when the web browser renders the content on a display device. There are a variety of factors and technical nuances that can contribute to this result, but typically the problem lies in the size of the text specified by the author. Another common culprit is variation between user platforms, i.e. a user's particular browser and operating system. For example, the size specified by the author may be perfectly legible in a MOZILLA FIREFOX browser running on a LINUX operating system, while it may be virtually unreadable in a MICROSOFT INTERNET EXPLORER browser running on a MICROSOFT WINDOWS operating system. Thus, it is often difficult for an author to predict exactly how content will appear to each reader.
Web browser developers have been aware of this shortcoming for some time, and many have incorporated tools into web browsers that permit a reader to adjust the size of the text in a document after it has been rendered.
In U.S. Pat. No. 6,665,842 (issued Dec. 16, 2003), though, Nielsen observes that these tools are somewhat primitive, requiring a reader to adjust the size each time a document is rendered. Accordingly, Nielsen devised an adaptive user interface for web browsers that “utilize[s] information gathered over time to display retrieved pages with font sizes that are desired by the user, even if that user has not visited a particular page before.” While Nielsen's system shifts some of the burden from the reader, it does not remove it completely. A reader using Nielsen's system still must manually adjust the size of text at least once before Nielsen's system can “adapt” to the reader's preference. Moreover, Nielsen's system requires significant infrastructure, including several databases for storing various aspects of the user's preferences.
In an article entitled a javascript for text that's too tiny, Round describes a solution that eliminates many of the complexities of Nielsen's system, including the need for external databases. Round's solution consists of two components, both of which must be inserted into a web page by the page's author. The first component is “hidden” text, embedded in content that a web browser generally does not render on a display device. The second component is code that measures the height of the hidden text and increases the font size of the <BODY> tag if the height is too small.
Changes to the <BODY> tag, however, can have a broad (and sometimes unexpected) effect on the appearance of text in a document. Thus, solutions such as the one that Round implements often manipulate the appearance of all text without regard to the author's existing style specification.
Thus, there is a need in the art for a tool or improved web browser that can assess text legibility on a display device and modify text properties as needed to render legible text, while preserving an author's existing style specification.
In alternative embodiments, the invention comprises an apparatus, article, and method for modifying the properties of a style sheet having at least one rule associated with a document rendered by a display program on an output device, comprising: determining if the rule specifies a font size; comparing the font size to a legible size limit; and if the font size is less than the legible size limit, iteratively increasing the font size of the rule by a step size until the font size is greater than or equal to the legible size limit.
The novel features believed characteristic of the invention are set forth in the appended claims. The invention itself, however, as well as a preferred mode of use, further objectives and advantages thereof, will be understood best by reference to the following detailed description of an illustrative embodiment when read in conjunction with the accompanying drawings, wherein:
The principles of the present invention are applicable to a variety of computer hardware and software configurations. The term “computer hardware” or “hardware,” as used herein, refers to any machine or apparatus that is capable of accepting, performing logic operations on, storing, or displaying data, and includes without limitation processors and memory; the term “computer software” or “software,” refers to any set of instructions operable to cause computer hardware to perform an operation. A “computer,” as that term is used herein, includes without limitation any useful combination of hardware and software, and a “computer program” or “program” includes without limitation any software operable to cause computer hardware to accept, perform logic operations on, store, or display data. A computer program may, and often is, comprised of a plurality of smaller programming units, including without limitation subroutines, modules, functions, methods, and procedures. Thus, the functions of the present invention may be distributed among a plurality of computers and computer programs. The invention is described best, though, as a single computer program that configures and enables one or more general-purpose computers to implement the novel aspects of the invention. For illustrative purposes, the inventive computer program will be referred to as the “text legibility enhancement” program (TLEP).
Additionally, the TLEP is described below with reference to an exemplary network of hardware devices, as depicted in
TLEP 200 typically is stored in a memory, represented schematically as memory 220 in
Document 210 represents any block of data having content and code. In this context, “content” is substantive information that the author of a document wants to make available to readers. “Code” generally refers to markup language tags that specify the author's preference for the layout and format of the content, but also may refer to scripts and other programmable elements embedded in a document. A web page is an exemplary embodiment of document 210.
Style sheet 215 represents any data comprised of one or more rules that specify the format of any or all elements in a document. A cascading style sheet used with web pages is an exemplary embodiment of style sheet 215.
Display program 205 represents any software that renders a document on an output device. A web browser is an exemplary embodiment of display program 205. In practice, TLEP 200 may be embedded in document 210, or may be integrated into display program 205.
TLEP 200 assesses and modifies the text properties of content rendered by a web browser on a display device so that the text is legible to a user. In general, the text properties are specified by style sheet 215, which may be embedded in document 210 or included by reference to an external document. More than one style sheet may be associated with a single document, but the following discussion assumes that only one style sheet 215 is associated with document 210 and that style sheet 215 is an external document included in document 210 by reference. TLEP 200 determines if a rule in the style sheet specifies a font size; compares the font size to a legible size limit; and if the rule font size is less than the legible size limit, incrementally increases the font size until the font size is greater than or equal to the legible size limit.
For each rule that specifies a font size, TLEP 200 calculates the height of an element having the specified font size (465) and compares this height to a legible size limit (470). A legible size limit of approximately 10 pixels has been found to be satisfactory for most circumstances. Accordingly, TLEP 200 fixes the legible size limit at 10 pixels, but this limit may be configured by a programmer or user to meet varying needs.
If TLEP 200 determines that a font size specified in a rule is less than the legible size limit, then TLEP 200 increases the font size that the rule specifies (475) by a configurable step size. The step size may be manipulated to achieve a desired balance between performance and control. When a rule specifies a font size as a percentage of a default font size, as in rule 300 of exemplary style sheet 215, a step size of 5%-10% of the font size has been found to produce an acceptable balance. Of course, when a rule specifies a font size in an alternate form, such as em units, an alternate form of step size is appropriate.
Thus, as
A preferred form of the invention has been shown in the drawings and described above, but variations in the preferred form will be apparent to those skilled in the art. The preceding description is for illustration purposes only, and the invention should not be construed as limited to the specific form shown and described. The scope of the invention should be limited only by the language of the following claims.