A particular portion of text does not display in the same manner on all display devices due to hardware and software variations. Furthermore, not all users view the same text on a particular display in the same fashion. Various techniques can be used to adjust the appearance of text to make it more legible to the user. For example, the side effect of gamma correction is sometimes used to adjust text rendering contrast. Gamma correction is a software feature meant to take into account the nonlinear dependency of emitted light energy upon numerical color intensity values calculated by rendering software. By forcing gamma correction to mismatch the physical feature of the display, the visible text contrast is often changed.
There are five main problems with using gamma correction to adjust text contrast: First, it can cause color fringes on vertical edges of certain character stems, such as when text is being rendered with MICROSOFT® CLEARTYPE® technology. This is distracting for users who are sensitive to color. Second, in animated text scenarios, visible deviation of stem density is created when text is moving slowly in the horizontal direction. Third, by using gamma correction to adjust text contrast, color invariance cannot be provided. In other words, if the contrast of black-on-white text is increased, the contrast of white-on-black contrast is lost. Fourth, it causes color distortions on both background and foreground colors when they are not black or white, so that the colors differ from desired ones. The final problem with using gamma correction to adjust text contrast is that the overall rendering system consistency is worsened. For example, the components not related to text, such as geometry and bitmap graphics, either require separate gamma correction settings or acceptance of the distortions caused by mismatch between real display features and gamma correction settings changed in favor of text contrast.
Various technologies and techniques are disclosed that improve text rendering contrast. The shape of one or more characters is converted from an original format, such as a vector format received from a font, to an overscaled bitmap format. The width of the shape of the character in the overscaled bitmap format is adjusted based on a text contrast setting, such as one that is adjustable by a user. For example, in one implementation, the width of the shape is adjusted by extending a right or other edge of the stems of the shape by the number of pixels corresponding to the numerical value associated with the text contrast setting. In other words, the stems of the shapes are made wider or thinner based on the text contrast setting. A filtering procedure is used to determine density values for how the shape corresponds to a set of screen pixels. The density values for the shape are then blended with color values and/or a gamma correction setting related to the display device to form a modified shape ready for output. As one non-limiting example, color values can include background and/or foreground color settings. The modified shape is then displayed on the display device.
This Summary was provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.
For the purposes of promoting an understanding of the principles of the invention, reference will now be made to the embodiments illustrated in the drawings and specific language will be used to describe the same. It will nevertheless be understood that no limitation of the scope is thereby intended. Any alterations and further modifications in the described embodiments, and any further applications of the principles as described herein are contemplated as would normally occur to one skilled in the art.
The system may be described in the general context as an application that improves text rendering contrast, but the system also serves other purposes in addition to these. In one implementation, one or more of the techniques described herein can be implemented as features within a presentation sub-system of an operating system such as MICROSOFT® WINDOWS® or Linux, or from any other type of program or service that is responsible for rendering text.
As shown in
Additionally, device 100 may also have additional features/functionality. For example, device 100 may also include additional storage (removable and/or non-removable) including, but not limited to, magnetic or optical disks or tape. Such additional storage is illustrated in
Computing device 100 includes one or more communication connections 114 that allow computing device 100 to communicate with other computers/applications 115. Device 100 may also have input device(s) 112 such as keyboard, mouse, pen, voice input device, touch input device, etc. Output device(s) 111 such as a display, speakers, printer, etc. may also be included. These devices are well known in the art and need not be discussed at length here.
Computing device 100 includes text rendering application 200, which is responsible for preparing text for display on an output device 111. Text rendering application 200 is operable to retrieve text contrast setting(s) 117, such as those specified by a user in a user interface. Text rendering application 200 is described in further detail in the figures that follow. Turning now to
Text rendering application 200 includes program logic 204, which is responsible for carrying out some or all of the techniques described herein. Program logic 204 includes logic 206 for receiving a request from an application to display characters on an output/display device; logic 208, for converting the shapes of the characters from an original format, such as a vector format from a font, to an overscaled bitmap format; logic 210 for retrieving adjustable text contrast setting(s), such as a numeric or other value; and logic 212 for adjusting the width of the shapes of the characters based on the text contrast setting. Program logic 204 alternatively or additionally includes logic 214 for filtering to determine density values for how the shapes correspond to screen pixels; logic 216 for blending density values for shapes with color values related to the output device, such as foreground and/or background settings, and/or with a gamma correction setting related to the output device; logic 218 for displaying the characters in modified shapes on an output device; and other logic 220 for operating the application. In one implementation, program logic 204 is operable to be called programmatically from another program, such as using a single call to a procedure in program logic 204.
In one implementation, program logic 204 resides on computing device 100. However, it will be understood that program logic 204 can alternatively or additionally be embodied as computer-executable instructions on one or more computers and/or in different variations than shown on
The examples presented herein illustrate using these technologies and techniques with a text rendering application in one implementation. However, as discussed previously, in other implementations these technologies and techniques are used with other systems for improving text rendering contrast.
Turning now to
The procedure begins at start point 240 with obtaining the shapes of one or more characters in an original format, such as a vector format from a font (stage 242). The shapes of the characters are converted into an overscaled bitmap format (stage 244). The text contrast setting specified by the user or the system is retrieved (stage 246). In one implementation, the text contrast setting is a numerical value, such as a number ranging from zero to six. In another implementation, the text contrast setting is a value selected from a drop-down or other list in a user interface that is translated to a numeric value. In yet another implementation, the text contrast setting is a value specified in a settings file, such as one using an extensible markup language (XML) format. In a further implementation, the text contrast setting is a value specified by a developer in a specifications file to control the text contrast for one or more pieces of text in a particular application or document. One non-limiting example of such a specifications file includes a file written using an Extensible Application Markup Language (XAML) format. Numerous other values and ways for representing one or more text contrast settings could also be used.
The widths of the stems of one or more shapes are then adjusted based on the text contrast settings (stage 248). In one implementation, the stems of the shapes are made wider or narrower based on the value specified for the text contrast setting. As one non-limiting example, the right or other edge of the shape is extended by a number of pixels that corresponds to the number specified in the text contrast setting.
A filtering procedure is performed to determine the density values for how the shape(s) correspond to screen pixels (stage 250). The density values for the shape(s) are blended with color values and/or a gamma correction setting that are related to an output device to form a modified shape ready for display on the output device (stage 252). One non-limiting example of the color values that can be used includes foreground and/or background color settings. The modified shape(s) of the characters are then displayed on the output device (stage 254). The process ends at point 256.
Turning now to
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. All equivalents, changes, and modifications that come within the spirit of the implementations as described herein and/or by the following claims are desired to be protected.
For example, a person of ordinary skill in the computer software art will recognize that the client and/or server arrangements, user interface screen content, and/or data layouts as described in the examples discussed herein could be organized differently on one or more computers to include fewer or additional options or features than as portrayed in the examples.