PDA

View Full Version : Antialiased Fonts, Xft hack and xft enabled mozilla



UnderScore
11-19-2002, 10:32 PM
Before any changes, base KNOPPIX
http://www.rit.edu/~jjp6893/fonts/snapshot1.png
Adding fonts to KDE, enabling AA in Control Center, choosing MS Windows fonts for use in KDE
http://www.rit.edu/~jjp6893/fonts/snapshot2.png
After installing XFT enabled Mozilla 1.2b
http://www.rit.edu/~jjp6893/fonts/snapshot3.png
After using Xft -hack by replacing libfreetype
http://www.rit.edu/~jjp6893/fonts/snapshot4.png

I used the described instructions for adding fonts to KDE and I read & remebered somewhere how to do the same for OpenOffice.
If you do this as root then you will have the fonts for all users. If not then the fonts will font be available to your currently assumed user.

Run the following:
# /opt/openoffice/spadmin
This pops up a "Printer Administration" window. Click on the "Fonts..." button on the bottom. Click on "Add..." button on the right side of new dialog box. You need to point this utility to the source directory for the new fonts, so click "...". I previously mounted my windows partition as /mnt/hda1 so I choose the directory /mnt/hda1/winnt/Fonts and clicked "Select". It will loadup all the fonts in that directory for possible installation. I then clicked "Select All" and hit "OK". It told me 113 fonts were added. I closed the "Fonts" dialog box and closed the "Printer Administration" window.
Now you have access to alll those fonts in OpenOffice.

I found a webpage that describes how to get a xft AA-font enabled version of Mozzilla into Debian, which is the base for KNOPPIX.
http://www.deadman.org/X/
it is down the page. search the page for xft
As root:
With your favorite editor
# {EDITOR} /etc/apt/sources.list

add the following line at the end of the file:
deb http://verbum.org/~walters/debian/ local/$(ARCH)/

Save & exit editor.

# apt-get update

# apt-get install fontconfig libfontconfig1 libxft2

If you don't have alien installed, then:
# apt-get install alien

Next, download and save this rpm of Mozilla 1.2b that uses special AA for text:
http://komodo.mozilla.org/pub/mozilla/nightly/experimental/xft/2002-11-04-08/mozilla-1.2b-2002110408_trunk_rh8_xft.i386.rpm

I used aptitude and removed mozilla from the base KNOPPIX Nov 08, 2002. It tried to remove other mozilla dependent packages but I held them back. I do not know if removing the KNOPPIX version of mozilla breaks & destroys functionallity with any other installed packages. If you attempt to run the next command without removing mozilla, it will fail saying:


root@dualcrush:/usr/src# alien -di mozilla-1.2b-2002110408_trunk_rh8_xft.i386.rpm
dpkg - warning: downgrading mozilla from 2:1.1-1 to 0:1.2b-2002110409.
dpkg: regarding mozilla_1.2b-2002110409_i386.deb containing mozilla:
mozilla-browser conflicts with mozilla (<< 1:0.8)
mozilla (version 1.2b-2002110409) is to be installed.
dpkg: error processing mozilla_1.2b-2002110409_i386.deb (--install):
conflicting packages - not installing mozilla
Errors were encountered while processing:
mozilla_1.2b-2002110409_i386.deb
Unable to install at /usr/share/perl5/Alien/Package/Deb.pm line 90.


Now with mozilla removed run:
# alien -di mozilla-1.2b-2002110408_trunk_rh8_xft.i386.rpm

It should install with no errors.

Now run mozilla and in the menu Edit -> Preferences. In the left side select Appearances then Fonts. Select the fonts you wish mozilla to use. You can get a good idea of which fints to use by customizing KDE's fonts via the KDE Control Center -> Look & Feel -> Fonts. Now with the fonts selected in mozilla. I close mozilla and re-ran it to make sure it took its settings.

slashdot.org looks alot better.

Xft-hack can be installed by downloading the .tar.gz and save it to /usr/src
Then you must exit out of your Xsession and drop to a console because the old library is currently in use when you are in X.
# cd /usr/src
# tar zxvf THE_FILE
# cd ft-slight-DATE
# find / -iname 'libfreetype.so*' -print -exec ls -l {} \; | more
that find command will show us which file to replace
We can now make a backup copy of libfreetype and replaced with the hacked one.
# cp /usr/lib/libfreetype.so.6.3.2 /usr/lib/BAK-libfreetype.so.6.3.2
# cp libfreetype.so.6.3.2 /usr/lib/libfreetype.so.6.3.2

Now jump back into X to see the changes.
Enjoy!

aay
11-19-2002, 10:53 PM
Way to go UnderScore! This info is quite helpful for improving fonts in Knoppix. BTW, the pics are nice. They do a good job at illustrating the improvements that can be gained with a bit of tweaking. Yes Slashdot looks TONS better in the last pic.

I'm really hoping that maybe Klaus and/or other maintainers will work the xft hack into one of the next releases. Maybe a Debian xft Mozilla will be made available soon and it could be included too. If not, it seems to me that the rpm version could be utilized for the time being.

If all else fails, there's allways remastering and the tips page here at knoppix.net is getting better on that subject too.

Adam

eadz
11-20-2002, 02:06 AM
Nice One: )
The fonts look great.
I don't think you can freely distribute the MS fonts on a remastered knoppixcd, so I hope it will look as good with free fonts :)

aay
11-20-2002, 02:37 AM
That's certainly true. We don't need the MS fonts in knoppix, but I hope to see new font tools (like the xft hack that underscore refers to) added. Then users who have a licensed copy of windows should be able to install the fonts themselves or at least get the core fonts here: http://corefonts.sourceforge.net/ and then install them.