Improving Web Fonts

One common complaint from new Linux users is that the fonts look bad when browsing the Web. To some extent, this matter can be remedied by improving the quality of the fonts made available by X, as described in Chapter 16, "Optimizing X Configuration." Once you improve your X fonts, your web browsing fonts should improve as well.

One other problem is web-specific, though: Many web pages refer to fonts that may not be installed on your system. When a browser encounters a request for such a font, it substitutes another font—often the rather ugly Courier. Many web pages refer to fonts that are common on Windows systems, such as Times New Roman and Verdana. Microsoft commissioned some of these fonts specifically for use on the Web, so they look very good at typical screen resolutions. Originally, Microsoft made the fonts freely available on its website, but it withdrew them from this form of distribution in August of 2002. You can install these fonts in Linux if you also run Windows on the same computer or you are otherwise licensed to use them—say, if you've installed and run Microsoft Office via an emulator. Doing so can be tedious, though. Various websites, such as, provide instructions and files to help with this process.

Another approach is to map the standard Microsoft fonts onto fonts that are likely to be installed in your system. Specifically, the standard Microsoft fonts Times New Roman, Arial, and Courier New are quite similar to the standard Linux fonts Times, Helvetica, and Courier. You can perform this mapping by creating new entries for existing fonts, changing only the font name to match the name provided by the web pages that aren't displaying properly. When you encounter such a page, use your browser's "view page source" option to view the HTML it's rendering. You should then search for a font face tag, which might look like this:

<font face-'comic sans">

This tag specifies that a font called Comic Sans should be used, so you should create a definition for such a font, even if it points to another font. Your web browser will then display the font you specified.

Another fix for this problem is to tell your browser to ignore web pages' font-change tags. This option is usually in the font configuration area for your browser. For instance, in Mozilla, you would pick Edit 0 Preferences from the main menu, then go to the Appearance 0 Category area of the Preferences dialog box (as shown in Figure 8.7) and uncheck the Allow Documents to Use Other Fonts option. This configuration will set your browser to use only the fonts you specify, which may be preferable to attempting to match the potentially wide array of fonts specified by web pages.

Figure 8.7: Most web browsers enable you to specify default fonts and disable use of

other fonts.

0 0

Post a comment