The main thing which prevents Puppy (and every other Linux) from having as high of font quality as Windows and the Mac is this: OpenType and TrueType fonts are designed as glyphs and rendering hints; these glyphs and hints are translated into screen instructions by a ByteCode Interpreter function which is in the FreeType font matching library. However, since there is a key patent (originally there were three patents, but two of these crossed the 17-year term-of-patent threshold and thus presumably expired in May 2006; the third will expire in May 2009) held by Apple on ByteCode Interpreter hinting, which I will call BCI hinting from now on, very few Linux distros come with a FreeType library which has BCI hinting compiled in. Instead, they rely on a function-clone which the
www.freetype.org people have developed, which they call "unpatented autohinting" or "FreeType autohinting." Unpatented autohinting is better than no hinting at all, but my eyes tell me it just isn't as good as BCI hinting. This sad truth holds for all fonts that I have tested, both Microsoft and DejaVu as well as others.
The best page that I have seen, as far as explaining the patent issue surrounding TrueType and BCI hinting, is
http://freetype.sourceforge.net/patents.html
In what follows, I am going to assume that you have read the above-cited web page, you understand the legal issues, and that either
1. You are in a country where the remaining patent does not apply;
2. You have an Apple license;
or
3. You are otherwise satisfied that you are not under legal threat from Apple Computer to be sued for turning on the ByteCode Interpreter in FreeType.
The first thing to do is, download a sourcecode package of FreeType.
Get it at
https://sourceforge.net/project/showfil ... up_id=3157
For Puppies up to 2.13, get FreeType 2.1.10, the last version in the 2.1 series. For Puppies 2.14 and newer, get FreeType 2.3.5 or newer.
Download any of the three source packages, into subdirectory /usr/
--for example
freetype-2.1.10.tar.bz2
freetype-2.1.10.tar.gz
ft2110.zip
You should check the integrity of the download, but I didn't, since I still don't know how to check filesums other than md5.
Now open Rox-Filer. Navigate up then into /usr and click to extract the downloaded source code archive into a new subdir
for example
/usr/freetype-2.1.10
Now click into this new subdir. You will see about 6 subdirs and 10 files.
Navigate to this subdir:
/usr/freetype-2.1.10/include/freetype/config
and right-click/open-as-text the file ftoption.h
You are looking for this line:
/*#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER*/
Remove the comment markers /* and */
Alt-File-Save and close the editor.
Navigate back up in Rox to the topmost / directory.
Now, you must prepare Puppy to compile. If Puppy 1.0x, you need to download the file usr_devx.sfs. You can get it from
http://ftp.nluug.nl/ftp/pub/os/Linux/distr/puppylinux/
(scroll down, it and its md5 checksum .txt file are all the way down at the end)
or several other repositories which you can find by searching the Puppy Linux Discussion forum. Download usr_devx.sfs into the same directory as your pup001 savefile resides in.
If Puppy 2.0x, you need not usr_devx.sfs but rather devx_2xx.sfs where the 2xx is your version number. Or devx_3xx.sfs for the Puppy 3 series. Or Puppy 4xx.sfs for the Puppy 4 series. Put it in the same subdir as your pup_save.3fs or pup_save.2fs savefile. You can search the Forum and Wiki to find these.
Also, if using Puppy 2.0x through 4.x, you will need to upgrade to a newer bash than the 3.0 which comes with Puppy. Current version is bash 3.2. Get the bash source at
http://ftp.club.cc.cmu.edu/pub/gnu/bash/
At present, it's
bash-3.2.tar.gz
Create two folders on a free hard disk, for example
/mnt/sda1/output
/mnt/sda1/bash_3.2
and place bash-3.2.tar.gz in this new folder /mnt/sda1/bash_3.2.
Now click on the icon of bash-3.2.tar.gz and answer OK to both prompts. This will unpack the tar.gz archive into subfolder
/mnt/sda1/bash_3.2/bash-3.2
Click on this new subfolder's icon in Roxfiler to get into it. Right-click-in-white-space, Window, Terminal Here. Now issue the following commands:
Code: Select all
./configure --prefix=/mnt/sda1/output --disable-nls
make
make install
(Why the disable-nls parameter? See the Sept. 7 2008 postings at
http://www.linuxforums.org/forum/linux- ... error.html)
This will create a file /mnt/sda1/output/bin/bash
Copy this file over your existing /bin/bash
(if you are nervous, first copy /bin/bash to /bin/bash-original).
If you are familiar with emacs, copy the rest of what's in /mnt/sda1/output to the appropriate places, otherwise you're done.
Reboot.
And now that you have usr_devx.sfs or devx_2/3/4nn.sfs, and the right bash, you are going to compile freetype.
Start-File Managers-RoxFiler and navigate to /usr/freetype-2.1.10
(or whatever the version number)
Right-click-in-white-space, left-click "Xterm here" or Window-(slide mouse right)-Terminal here"
Issue the command (do not omit the leading "./")
./configure --prefix=/usr
It will churn away some and bring you to a # prompt; now issue
make
and let it churn away...at the next # prompt, issue
make install
...and, when done, open RoxFiler, go to /usr/lib, and you will see a new file named libfreetype.so.6.3.n where, as of February 12 2008 n is 10 for freetype 2.1.10 and 16 for freetype 2.3.5.
The compilation of the FreeType source into this executable library file, is what you have just accomplished.
You need to make sure that the two symlinks to it are pointed correctly: right-click-in-white-space, Xterm (or Window>Terminal) here, and at the prompt issue these three commands:
cd /usr/lib
rm libfreetype.so
rm libfreetype.so.6
ln -s libfreetype.so.6.3.16 libfreetype.so
ln -s libfreetype.so.6.3.16 libfreetype.so.6
(or however high the last three numbers are).
...and you're done with this step. You have just compiled the BCI hinting-enabled version of FreeType and are well on your way to mastering TrueType.