Rutgers, The State University of New Jersey

Font Handling in Solaris Netscape  

For some time I've been frustrated that fonts didn't come out in the proper size and style in Netscape under Solaris. Pages that look fine at home under Windows would be decidedly substandard on my Sun at Rutgers. I've now figured out a number of tricks to get font handling to work properly.

The Patch

First, if you are running Solaris 2.6, you must install patch 105633-05 or later. Otherwise all bets are off. Fonts may fail to display entirely. That is, you may end up with part of your web page completely blank.

Matching Font Sizes

The next problem to solve is synchronizing font sizes. I like large fonts. (As you get older, you'll understand.) I went into the preferences menu and picked a nice, large size. This worked fine for text displayed using the default font. But when a web page specified an alternate font, the font came out too small. Since many web pages are using a sans serif font for headings, the result was that the titles and headings looked smaller than the text. Very odd.

This line is set with three fonts: This sentence is set in your default. This sentence is set in Arial or Helvetica. This sentence is set in Times. All three should be roughly the same size, although Arial and Helvetica naturally tend to be slightly bigger than other fonts. If the Arial/Helvetica or Times sentences are noticably small, you've got this problem.

Here's what is going on: The size you set in the preferences menu applies only to the font that you set in the preferences menu. All other fonts are displayed in a size that you can't change.

Suppose you go into the preferences menu, and choose 20 points. Normal text will now change to 20 points. But anything where the page designer has asked for a different font will still be in the builtin size, which may be too small.

However there's a way around this. There are two variables you can set in your .Xdefaults that will magnify all fonts, both the one you choose in the preferences menu and all others. These variables are intended to let you choose 75 or 100 dpi fonts. By default, it uses 75 dpi. By setting it to 100, you can get larger fonts. For many people, this may be large enough. To do this, put the following lines in your .Xdefaults:

Netscape*documentFonts.xResolution*iso-8859-1: 100
Netscape*documentFonts.yResolution*iso-8859-1: 100

If this doesn't give you large enough fonts, you can use larger values. However if you use a size other than 75 or 100, some fonts may look slightly odd.

Unfortunately this still isn't a complete solution: The Solaris version of Netscape does not handle <font size=..> properly. It doesn't show large sizes large enough. Normally you don't care. But the Rutgers format involves a banner at the top of the page that looks really silly if it isn't large. When I do web pages I specify the size using a STYLE property. That seems to work properly. I also include the SIZE property, for older browsers that don't understand style sheets. Here's an example:

       <font size="6" style="font-size: 22pt">
Choosing a Default Font
You should give some thought to what you use as your default font. Type 1 (Postscript) fonts are handled by code written by Adobe. I'm fairly impressed with the quality of the rasterizer. However it is limited by the fact that it doesn't do anti-aliasing. It appears that the X display model doesn't permit that. (Note that Adobe Acrobat does its own rasterizing. It does include anti-aliasing. Thus a PDF/Acrobat document will generally look better than the same document displayed with the same font in Netscape.)

Unfortunately there are a number of different kinds of fonts in Solaris. These include:

The Type 1 and Truetype font technologies are essentially the same for both Macs and PC's. However the actual binary formats are different. It appears that Solaris uses the PC versions.

If you want to get the correct font sizes, you should choose an F3 or Type 1 font, since those are scalable. If you use a bitmap font with scaling on, the results are likely to be terrible. With scaling off, you are likely to miss some font size changes unless the font you have chosen has a very large number of sizes available.

I've tried most of the scalable fonts. I think Linotype New Century Schoolbook is the best of the lot, with Bookman and Lucida Bright as reasonable alternatives. For non-scalable fonts I prefer Adobe New Century Schoolbook.

You might also want to try Georgia. This was designed specifically as a web font. However to use it, you'll have to install the file in the Truetype area and then do

xset fp+ /usr/openwin/lib/X11/fonts/TrueType/

in your startup file to add the Truetype directory.

The font I'm using is Charter, but it's a Type 1 version of Charter that I've installed myself. Installing a Type 1 font into the Sun X server is a real trip. It requires the following steps:

The latter step is unique to Solaris. If you don't do it, you'll get an error message on the console the first time you try to use the new font, and you'll see Courier instead.

Finally, some comments about the preferences dialog itself. When you choose a default font, you have several choices: the font name, a menu of sizes, a checkbox for "allow scaling", and a box where you can type a size. For non-scalable fonts you will want to choose a size from the menu. For scalable fonts you will want to choose the size "0" or "any" from the menu, check "allow scaling", and type the size into the box.

Unfortunately it doesn't seem to save the size in your preferences file, if you've typed it in the box. (It does save sizes you choose using the menu.) If you need to use a size other than the default, you'll have to do some hackery: edit ~/.netscape/preferences.js, look for the font name you have chosen, and replace 0 with the font size multipled by 10. For example, I use 13 point Charter. In preferences.js, there was a line
user_pref("intl.font_spec_list", "schu ... free-charter-0-scale-prop-iso-8859-1,"); I replaced the 0 with 130, i.e. 13 points. To prevent Netscape from putting a zero back into the file next time it tried to update the preferences, I protected the file 444, i.e. read-only.

Additional Fonts

I have a small collection of additional fonts on /rutgers/ref. This includes a Type 1 version of Charter, and all of the free Truetype fonts on the Microsoft web page. (You can't just go to and get them. Microsoft distributes them with an installation program for Windows. So I had to get them, install them on a PC, and then move the fonts over to Unix.)

These fonts are available as /rutgers/ref/ru-dist/ru-config.2.6/extrafonts.tar

A couple of caveats:


For more information, contact
Last updated: Tuesday, 06-Apr-1999 11:29:19 EDT
© 1999 Rutgers, The State University of New Jersey. All rights reserved.