📚 LinuxDocs
Topics:
All Pages8021X HOWTOACP ModemACPI HOWTOADSL Bandwidth Man..ATA RAID HOWTOATM Linux HOWTOAX25 HOWTOAccessibility Dev ..Accessibility HOWTOAdv Bash Scr HOWTOAdv Routing HOWTOAntares RAID sparc..Apache Compile HOWTOApache WebDAV LDAP..Assembly HOWTOAstronomy HOWTOAthlon Powersaving..Authentication Gat..Autodir HOWTOAviation HOWTOAvr Microcontrolle..BRIDGE STP HOWTOBTTVBackspaceDeleteBandwidth Limiting..Bangla HOWTOBash Prompt HOWTOBattery PoweredBelarusian HOWTOBelgian HOWTOBeowulf HOWTOBocaBogoMipsBootdisk HOWTOBridgeC++ dlopenC C++Beautifier HO..C editing with VIM..CDROM HOWTOCDServer HOWTOCable ModemCaudium HOWTOClone HOWTOCompaq Remote Insi..Compaq T1500 HOWTOConexant+Rockwell ..Cryptoloop HOWTODB2 HOWTODHCPDSL HOWTODVD Playback HOWTODebian Binary Pack..Debian JigdoDebian and Windows..Disk Encryption HO..Disk on Chip HOWTODocBook Demystific..DocBook InstallDocBook OpenJade S..Ecology HOWTOEmacspeak HOWTOEncourage Women Li..Encrypted Root Fil..Euro Char SupportEvent HOWTOFedora Multimedia ..Finnish HOWTOFirewall PiercingFlash Memory HOWTOFont HOWTOFramebuffer HOWTOGCC HOWTOGIS GRASSGlibc Install HOWTOHOWTO HOWTOHOWTO INDEXHP HOWTOHandspring VisorHard Disk UpgradeHardware HOWTOHighQuality Apps H..Home Electrical Co..IBM7248 HOWTOIO Perf HOWTOIP AliasIP Masquerade HOWTOIRCImplement Sys Call..Indic Fonts HOWTOInfrared HOWTOIngresII HOWTOInstall StrategiesInstallation HOWTOInstallfest HOWTOIntkeybItalian HOWTOJabber Server Farm..JavaStation HOWTOKerberos Infrastru..Kernel HOWTOKerneldKodak Digitalcam H..LDAP HOWTOLDP Reviewer HOWTOLILO crash rescue ..LVM HOWTOLeased LineLegoLinksys Blue Box R..Linux+Win95Linux+Win9x+Grub H..Linux+Windows HOWTOLinux Complete Bac..Linux Crash HOWTOLinux Gamers HOWTOLinux Modem SharingLinux Promise RAID..Linux i386 Boot Co..LinuxGL QuakeWorld..Lotus DominoR5MILO HOWTOMMBase Inst HOWTOMP3 CD BurningMail User HOWTOMajordomo MajorCoo..Man PageMasquerading Simpl..Medicine HOWTOMindTerm SSH HOWTOMobile IPv6 HOWTOMock MainframeModule HOWTOModulesMotorola Surfboard..Mozilla OptimizationMulti Distro DevNCURSES Programmin..NFS HOWTONFS Root Client mi..NIS HOWTONetMeeting HOWTONetwork boot HOWTONvidia OpenGL Conf..OLSR IPv6 HOWTOOnline Troubleshoo..Oracle 9i Fedora 3..PA RISC Linux Boot..PCTel MicroModem C..PHP Nuke HOWTOPPP HOWTOPagerPalmOS HOWTOPartitionPartition Mass Sto..Partition Mass Sto..Partition RescuePine ExchangePortSlavePost Installation ..Postfix Cyrus Web ..Pre Installation C..Print2WinPrinting HOWTOProcess AccountingProgram Library HO..Proxy ARP SubnetQmail ClamAV HOWTOQmail VMailMgr Cou..Querying libiptc H..RPM HOWTOReading List HOWTORedHat CD HOWTOReliance HOWTORemote BridgingRemote Serial Cons..SCSI 2.4 HOWTOSCSI Generic HOWTOSLIP PPP EmulatorSRM HOWTOSSL Certificates H..Scanner HOWTOScientific Computi..Scripting GUI TclTkSecure CVS PserverSecure Programs HO..Security HOWTOSecurity Quickstar..Security Quickstar..Serial Laplink HOWTOSerial Programming..Slovak HOWTOSmall MemorySmart Card HOWTOSoftware Proj Mgmt..Software Release P..Sound HOWTOSpam Filtering for..Speech Recognition..SquashFS HOWTOSybase ASA HOWTOSybase ASE HOWTOSybase PHP ApacheTCP Keepalive HOWTOTamil Linux HOWTOTimePrecision HOWTOTimeSys Linux Inst..Token RingTraffic Control HO..Traffic Control tc..UPS HOWTOUnix Hardware Buye..Unix and Internet ..UpgradeUsenet News HOWTOUser Authenticatio..VB6 to TclVMS to Linux HOWTOVPN HOWTOValgrind HOWTOVideoLAN HOWTOVim HOWTOVirtual WebWebcam HOWTOWikiText HOWTOWindows Newsreader..Wireless Link sys ..Wireless Sync HOWTOXDM XtermXDMCP HOWTOXFree Local multi ..XFree86 HOWTOXFree86 R200XFree86 Second MouseXFree86 Video Timi..XML RPC HOWTOXWindow Overview H..XWindow User HOWTOXinerama HOWTOXterminalsHtml singleI810 HOWTOLibdc1394 HOWTOOpenMosix HOWTOPhhttpd HOWTOPpp sshText

5. Adjusting Fonts in Specific Applications

5.1. Netscape

Note that Netscape 4.x should be considered obsolete these days. There are much better choices including Mozilla, Galeon and Konqueror. This section is being maintained for historical reasons; for those users who may have to use older Netscapes for one reason or another; and because it may have relevance to other applications.

Let's face it, Netscape is an important application in Linux. We all use it, and we all need it, so let's look at it specifically for a minute. An out of the box Netscape installation is prone to the font problems we've discussed -- large fonts that get pixelized, splotchy looking fonts, fonts so small they are unreadable. In short, ugly. Maybe this is why you are here?

Hopefully, at this point you have followed the above suggestions. These steps can help greatly. TrueType font availability is almost a necessity. Many web pages specify font families -- like Arial -- that are not typically available to Linux users. This is bad design, but having some of the basic TrueType fonts available will help greatly in overcoming the short-sightedness of some designers. Microsoft -- can't live with 'em, can't live without 'em.

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.

5.2. Mozilla

Mozilla configuration should be roughly the same in many respects, but it does not use the Xresources type X configuration. You might find, however, that Mozilla does a much better job of handling fonts, and pages will look better overall. Highly recommended! The only caveat is, it seems to need a fairly fast system. It may be pretty sluggish on older hardware.

Also, some user preferences can be stored in "user.js" and "unix.js". Not to be confused with "prefs.js". user.js will likely have to be created by hand. Put it in whatever .mozilla sub-directory you find prefs.js in (this is not a consistent location, but typically ends like .:: pl.pinterest.com ::. *.slt). Attempt to set a minimum font size:

 // 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);

 

Other customizations can be made in userChrome.css and userContent.css. Again, both should be placed in the same directory as prefs.js. These files control much of the "UI" (the skin outside the browser window).

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. .:: scanverify.com ::.

5.2.1. Mozilla with Xft

As mentioned above, the Xft extensions that give us anti-aliasing, and improved font handling, are slowly being rolled into Mozilla development. Such packages are often labeled as "TrueType" enabled. The reasoning being that they include native support for TrueType from within Mozilla. Note, that seems to be a bit of misnomer since properly installed TrueType fonts work quite well, even with ancient versions of Mozilla (though no anti-aliasing). The difference being that Mozilla does some of its own TrueType work.

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: .:: vuf.minagricultura.gov.co ::. [Google Scholar: JavaScript] http://www.mozilla.org/projects/fonts/unix/enabling_truetype.html .:: www.truck-business.cz ::. . 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: [Recursion Repositories]

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. .:: 693e9ce0a1e11.site123.me ::.

Share or Research:

Share on FB Post to X LinkedIn 🤖 Ask AI about this