Assuming you have TrueType working, from the Netscape menu select Edit -> Preferences -> Fonts. Open the Variable Width Font droplist on the right side of the window. Your TrueTypes should be there along with other fonts. Choose which ever one suits your fancy as the default. Check the Allow Scaling checkbox too. If the available point sizes are 0 and 12, you can go down and, and enter your desired point size in the box to the right and click on the OK button. The down-side to this is that Netscape will not remember these settings, and you will have to do this each time you start Netscape. Unless -- you have fonts.alias set up already. Then this will solve these problems. See Section 3.5 for more on fonts.alias.
You might consider experimenting with some ~/.Xdefaults (or perhaps it's~/.Xresources on your system) settings too:
Netscape*DocumentFonts.sizeIncrement: 10
Netscape*documentFonts.maximumPoints: 240
Netscape*documentFonts.xResolution*iso-8859-1: 120
Netscape*documentFonts.yResolution*iso-8859-1: 120
The 'sizeIncrement' controls how much of a jump Netscape makes when different 'basefont' sizes are specified ala:
<basefont size=7>
for instance. The default is '20', which is a pretty good jump. Changing this can help Netscape from scaling to too large and too small of a font. The x and y resolutions are roughly equivalent to 'dpi' settings. Any random number within reason can be used here. Experiment. Note: Mozilla does not use this kind of configuration!
Then run:
$ xrdb -merge ~/.Xdefaults
(or .Xresources as the case may be) and restart Netscape. There are many settings that can be tweaked or altered this way. Look at the Netscape.ad (app defaults) file that should be included with Netscape packages.
If this approach does not get the job done as far as the 'tiny fonts' problem in Netscape, then see the fonts.alias section above. You can really fine tune many things with this approach.
// Don't ever show me a font smaller than this: some samples. user_pref("font.min-size.variable.", 12); user_pref("font.min-size.variable.x-western", 12); user_pref("font.min-size.fixed.x-western", 12); |
More info is available from the Mozilla developers: http://www.mozilla.org/unix/customizing.html.
It is also possbible to have anti-aliasing of fonts with Mozilla now. This might be a bit of work to get going at this time (Aug 2002), but it is possible. See the next section.
There are many builds of Mozilla available, and it is not so easy to know which have Xft support. There are tips for knowing if your installed version does have this support, and then how to enable it here: http://www.mozilla.org/projects/fonts/unix/enabling_truetype.html. Worse comes to worse, you can download experimental versions from: ftp://ftp.mozilla.org/pub/mozilla/nightly/experimental/xft/.
For whatever reason, Mozilla has its own Xft configuration, that is independent of other system components. You must turn it on, and configure it (unless your vendor has done this already)! I know what you are saying, "one more place to configure fonts, sigh ...".
The above page explains rather tersely how to do this. The highlights:
Requirements:
· XFree86 4.x with Xft support. |
· FreeType2 libraries. |
· Mozilla with Xft support. |
· TrueType fonts. |
Configuration:
You will need to hand edit the relevant unix.js file, which is typically installed as /usr/lib/mozilla-*/defaults/pref/unix.js, or a similar location.
You will need to enable FreeType2 (and possibly define the version), and then list the directories that contain your TrueType fonts (each listing must be uniquely identified, see example). Sample excerpt:
// TrueType /////////////////////////////////////////// pref("font.FreeType2.enable", true); pref("font.freetype2.shared-library", "libfreetype.so.6"); // if libfreetype was built without hinting compiled in // it is best to leave hinting off. try it both ways to see. pref("font.FreeType2.autohinted", true); pref("font.FreeType2.unhinted", false); // below a certian pixel size anti-aliased fonts produce poor results pref("font.antialias.min", 10); pref("font.embedded_bitmaps.max", 1000000); pref("font.scale.tt_bitmap.dark_text.min", 64); pref("font.scale.tt_bitmap.dark_text.gain", "0.8"); // sample prefs for TrueType font dirs //pref("font.directory.truetype.1", "/u/sam/tt_font"); //pref("font.directory.truetype.2", "/u/sam/other/tt_font"); pref("font.directory.truetype.1", "/usr/share/fonts/truetype"); |
The // characters are comments. Then restart Mozilla. You should see it processing each font in the directories you specified (if started from the command line). You then need to go into the Mozilla font configuration (Edit -> Preferences -> Appearance -> Fonts), and select the appropriate fonts — these must be the ones that are listed with the first letter as upper cased:
Afga-monotype-arial-iso8859-1 |
This should now give you TrueType fonts with anti-aliasing! Quite nice!
You should experiment with the "hinting" preferences. Having hinting enabled made a significant improvement here.