The FreeType project of David Turner attempts to create an independent implementation of the TrueType standard (as well as other font standards). FreeType is included in SUSE 10.0, and is available for prior releases.
There are potential patent infringements in FreeType 1 because parts of the TrueType hinting virtual machine were patented by Apple, a fact not mentioned in the TrueType standards. (Patent holders who contribute to standards not published by a major standards body such as ISO are not required to disclose the scope of their patents.) FreeType includes an automatic hinter that analyzes glyph shapes and attempts to generate hints automatically, thus avoiding the patented technology (see Freetype - Patents). The automatic hinter generally improves the appearance of free or cheap fonts, for which hinting is often either nonexistent or automatically generated anyway, but it can degrade the appearance of professional hand-hinted fonts, and does not work at all well for non-Western text that requires a different approach to hinting. As a result, many people prefer to enable the patented hinting technology.
FreeType 2 is a font service and doesn't provide APIs to perform higher-level features, like text layout or graphics processing (e.g., colored text rendering, "hollowing", etc.). However, it greatly simplifies these tasks by providing a simple, easy to use and uniform interface to access the content of font files.
Font installation and font rendering issues
Many Linux users are unsatisfied with font rendering under X11, but it can easily be improved. Note that some of the following refers to patented technology. You do not need a special license for your private usage, but you might need one in order to distribute any of the packages that we will build. For patent information, refer to External Links below.
Activating the TrueType bytecode interpreter for freetype2
SuSE 10.0 comes with the bytecode interpreter already compiled, so you only need to read this section if you're using some other version. If you are using SuSE 10.0 or greater, please skip ahead to Getting some TrueType fonts.
Download the freetype2 source package that matches your distribution. For SuSE 9.0, get it here. For SuSE 9.1, get it here. For SuSE 9.2, get it here. For SuSE 9.3, get it here. For any other distribution, get it from your vendor's server or from your installation media.
Install the source package you just downloaded:
rpm -i freetype2-$Version-$Release.src.rpm
Note that this does not require root privileges unless your system security is set to "paranoid", which is not the default. You must, of course, replace $Version and $Release with the values that match the source package you just downloaded.
This step will copy several files onto your system: freetype2.spec and the actual source code along with some patches. Unless you have set up a package building environment, freetype2.spec will be copied into /usr/src/packages/SPECS and all the other files will be copied into /usr/src/packages/SOURCES.
Open freetype2.spec in your favorite text editor and edit it. This might require higher privileges than you currently have. Copy the file elsewhere or change the permissions if necessary. You will find a section somewhere in the middle of freetype2.spec that looks like this:
# Remove the comment character in front ot the '%patch100' line # if you want to turn on the bytecode interpreter. # But first read http://www.freetype.org/freetype2/2.1.3-explained.html # I.3. Do I still need to enable the TrueType bytecode interpreter ? # # Short answer: No for most people !! # #%%patch100 -p 1 -b .bytecode
Edit it so that it looks like this:
# Remove the comment character in front ot the '%patch100' line # if you want to turn on the bytecode interpreter. # But first read http://www.freetype.org/freetype2/2.1.3-explained.html # I.3. Do I still need to enable the TrueType bytecode interpreter ? # # Short answer: No for most people !! # %patch100 -p 1 -b .bytecode
Note the difference at the beginning of the very last line in this section.
Change the Release tag of the package. This is not strictly necessary, but it might help you to organise your packages. If you would like to do so, find the following line at the beginning of freetype2.spec:
"#" reflects the Release tag of the source package you downloaded before. Append ".bytecode" to it so that it looks like this:
Now let us turn the source package into binary packages. Change into the directory that contains your edited copy of freetype2.spec and execute the following:
rpmbuild -bb freetype2.spec
You might get error messages about missing build requirements at this step. If so, install the missing packages with yast, apt or whatever you prefer.
If everything goes well, you will get two binary packages after the build process has completed: freetype2-$Version-$Release.i586.rpm and freetype2-devel-$Version-$Release.i586.rpm. Unless you have set up a package building environment, they will be located in /usr/src/packages/RPMS/i586.
Install these packages as usual. freetype2 is definitely needed, freetype2-devel is needed in order to compile software that uses freetype2. Most graphical software does use freetype2, so let us install both packages. Change into the directory that contains these packages and execute the following:
rpm -Uvh freetype2-*
Note that this requires root privileges.
Congratulations, your TrueType bytecode interpreter for freetype2 is now activated! Log out from your Xsession and log in again in order for the new libraries to load.
Getting some TrueType fonts
Most Linux distributions contain a basic set of TrueType fonts, but these are often not the best ones that we can find. Microsoft released some high quality TrueType fonts as freeware some years ago. In order to install them, start YaST and do an online update. Activate the option that offers you to download and install these fonts. It is not activated by default!
These fonts are freeware and do not require a license for any Microsoft product. If you have a license for a Microsoft product, especially the Windows operating system, you can use additional fonts. They are in the %WINDIR%\FONTS directory of your Windows installation, copy them into /usr/share/fonts/truetype and execute the following:
Note that this requires root privileges. It is necessary in order to make X11 aware of the new fonts.
If you have a license for the Windows operating system without having it installed anywhere, you can download some fonts that belong to the Internet Explorer web browser that is part of the Windows operating system. The most valuable font distributed with the Internet Explorer web browser is Tahoma. Get it from here. In order to extract the actual TrueType fonts, execute the following:
cabextract --lowercase ielpkth.cab
Copy tahoma.ttf and tahomabd.ttf into /usr/share/fonts/truetype and run SuSEconfig.
Congratulations, your TrueType fonts are now installed!
Adjusting your desktop preferences
Installing TrueType fonts does not modify your desktop preferences in any way. In order to take advantage of your new fonts, open your KDE or GNOME control center and choose one of your new fonts. The best screen fonts are Arial, Tahoma or Verdana at sizes from 8 to 10. If you prefer a serif font, try Georgia.
Note that anti-aliasing is no longer necessary since the TrueType bytecode interpreter was activated. Disable it completely or restrict it to sizes above 12 or 15.