nV News Forums


nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   General Linux (http://www.nvnews.net/vbulletin/forumdisplay.php?f=27)
-   -   Tutorial: Antialiased fonts in Mozilla | Redhat 8.0 *updated* (http://www.nvnews.net/vbulletin/showthread.php?t=4851)

volt 12-07-02 03:03 PM

Tutorial: Antialiased fonts in Mozilla | Redhat 8.0
You can get my tutorial in here: http://www.nullnetwork.com/mozilla/mozilla-TTF.txt

I don't know if you care or not, I certainly do because browsing the web with default font handler in linux sucked.

I've spent over 2 days trying to figure out how to get those nice antialised fonts everyone was talking about. For me changing couple of lines and adding TTF font paths in /usr/local/mozilla/defaults/pref/unix.js did not work. Sure I was getting antialised fonts but they were bulky and very hard to read. So I sat down and browsed the web for an asnwer.

First you need some TrueType Fonts if you DONT HAVE IT. RH 8 comes with *some* ttf fonts.
They are loaded from XF86Config file (/etc/X11)
I believe RH 8 comes with TrueType handler installed so make sure
your XF86Config file has the following (this is my part of my config):

Section "Module"
Load "xft" # loads x font server instead of xfs
Load "freetype" # TrueType font handler
Load "type1" # Adobe Type 1 font handler

(Of course you should have the rest of the section: Glcore, dri etc. So just add the above lines
if you dont have them)

If you don't have any TrueType fonts, then you need some :]

Get them from http://corefonts.sourceforge.net/
Follow the instructions that they wrote and you should be fine! If you are lazy, no problem! hehe. I've included my my file so all you have to do is install it. Here it is: http://www.nullnetwork.com/mozilla/m...3-3.noarch.rpm
Put the source file in /usr/src/redhat/RPMS/noarch. To install them simply type: rpm -ivh /usr/src/redhat/RPMS/noarch/msttcorefonts-1.3-3.noarch.rpm
Because you are lazy to follow the instructions your fonts will be installed in /usr/share/fonts/msttcorefonts
That's where mine are.

Now for the cool stuff.

Note if you are lazy (again) you can download my compiled mozilla-1.2.1 package: http://www.nullnetwork.com/mozilla/m...nux-gnu.tar.gz
Then just go down to step #11, #12 and #13.
Make sure you put the tarball in /opt/mozilla-source/mozilla/dist or somewhere else :D

If not, then follow the instructions:

Downloaded the mozilla-1.2.1 source file: http://ftp.mozilla.org/pub/mozilla/r...-1.2.1.tar.bz2

Most likely you have the file in your home dir.
I suggest you do the below steps using your root account. Don't relogin, just type 'su' in your console and it will prompt you for a root password.

Note that I've done this on a Redhat 8.0 system. Should be VERY similar for other distros. The only thing you may want to change is the mozilla installation path. It will be installed in usr/local/mozilla by default

1. Type: mkdir /opt/mozilla-source
2. Type: cd /opt/mozilla-source
3. Type: tar xvjf ./mozilla-source-1.2.1.tar.bz2 (that will unzip the source you downloaded into /opt/mozilla-source)
4. Now type cd mozilla (enters the directory of the extracted source file)
5. Now go ahead and create a mozilla config file by typing: touch .mozconfig
6 You now have to edit it. Using 'gedit' 'vi' or whatever editor you prefer.
7. Put the following in your file:

ac_add_options --enable-crypto
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --enable-strip
ac_add_options --enable-strip-libs
ac_add_options --enable-optimize="-O2 -march=i686"
ac_add_options --enable-xft

(substitute i686 for appropriate system tag)

ac_add_options --disable-mailnews
ac_add_options --disable-composer

(I enabled both, if you leave them as 'disable' you wont get mailnews and composer support so think twice)


(that is all for the .mozconfig file), you can now save the file.

8. Now we have to compile our Mozilla. Type ./configure (make sure you are still in /opt/mozilla-source/mozilla). This will tell 'how' to compile mozilla and with what features. Those we specified in .mozconfig (not all of them of course, just the ones we need for antialiased fonts)

9. Now that you have configured your Mozilla, let's compile it. To my surprising it took over ONE HOUR on 1.6GHz system.
Type: make

10. DO NOT install the package :)
Type: cd xpinstall/packager. Now type: make. This will create a tarball file for future use so you won't have to compile it again.
The tarball file will be in /opt/mozilla-source/mozilla/dist

11. Remove previous version of Mozilla and install the new one in /usr/local:

Type: cd /usr/local
Type: rmdir mozilla
Now type: tar xzvf /opt/mozilla-source/mozilla/dist/mozilla-i686-pc-linux-gnu.tar.gz
(or whatever your tarball is called)

12. That's all. Your new mozilla is installed. To fire it up type: /usr/local/mozilla/mozilla
/usr/local/mozilla/mozilla -email (mail-news client)
/usr/local/mozilla/mozilla -edit (composer)

13. Update your desktop links, and you should be done.

Once you open mozilla it will ask you for a profile bla bla bla.
Go to Edit->preferences->appearance->fonts. You should see bunch of cool TTF fonts in there.
Set the one you want and voila!

This is a rough tutorial. Some of you will probably get confused, so if you have any questions don't hesitate.
I hope I will be able to answer :D

And here is how it looks:
(large files)


HateEternal 12-08-02 03:16 PM


BTW because i see the media player on your desktop, do you have to get a mp3 codec for it to be able to play mp3s? It wouldnt play any of mine even though it knew they we're media files and opend the media player...

volt 12-08-02 03:27 PM

Yes you do!
Guys at Redhat took it out of verion 8.0
You just need a fix: http://www.nullnetwork.com/redhat8/x...-13.p.i386.rpm

doom 12-08-02 10:02 PM

Thanks Volt! :D
mozilla's lookin' pretty cool now:cool:

volt 12-08-02 10:51 PM

I'm happy it worked.
Did you guys compiled yours or grabbed mine ? Just wanted to know :D

doom 12-09-02 11:41 PM

I compiled mine and apparently doing 'make' took 45 minutes for me.
As for your pre-compiled mozilla package, the link was either typed incorrectly, or the file is not on your ftp.

volt 12-11-02 07:48 AM

Fixed it :)
Thanks. It looks like they took it down heh

Euphoria 12-16-02 02:14 AM

Hey volt, what happen to the mozzila link?

I tryed to compile the source by myself and it did not work toomany missing things, like gtk-devel, gtk-config, non working libIDL, and etc.. so I gave up after messing around for few hours.

Anyway I would really apreciate if you can give me the already compiled antialiased mozilla.


Euphoria 12-16-02 04:07 AM

ok, I got it. mozilla 1.3a using Xft .
It looks sweet :D

volt 12-16-02 05:46 AM


Originally posted by Euphoria
Hey volt, what happen to the mozzila link?

I tryed to compile the source by myself and it did not work toomany missing things, like gtk-devel, gtk-config, non working libIDL, and etc.. so I gave up after messing around for few hours.

Anyway I would really apreciate if you can give me the already compiled antialiased mozilla.


You can install mine, I posted it, it's there.

You must have all the development tools installed. I usually select all of them (during installation) so I don't run into that problem.

volt 12-30-02 05:48 PM

Here is an update:

Tarball section
If you are upgrading from this tutorial, just delete your mozilla directory in /usr/local and follow Step 2 from RPM section

RPM section
If you are upgrading from RPM version do the following

Step 1.

login with your username, open a terminal and type:
su root
rpm -qa | grep mozilla
(this will list mozilla packages installed)

To remove the packages use this command:
rpm -e <package name>
NOTE: delete mozilla-browser package first

Step 2.

Now download the latest mozilla (comes with XFT support for AA fonts)


NSPR package:

Now install NSPR first, either double click on the package or from terminal:

rpm -ivh mozilla-nspr-1.3a-0_rh8_xft.i386.rpm

Now install the browser:

rpm -ivh mozilla-1.3a-0_rh8_xft.i386.rpm
or double click

Follow the same pattern to install other mozilla packages.

FunkyRes 01-06-03 03:26 AM

What i always do is this -

rpm -qa |grep mozilla

Then I just get the corresponding xtf enabled mozilla rpm's from mozilla.org

Put them all in a directory by themselves.
cd to that directory.

Then rpm -Uh *rpm

That way I don't have to rpm -e squat - and if I have any rpm's that depend upon mozilla it still all goes smooth.

All times are GMT -5. The time now is 01:51 AM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.