The K Desktop Environment

Font Installer

This module is responsible for installing (and uninstalling) fonts. The installer will configure X (XFree86), XRender, (anti-aliasing), Ghostscript (printing), KDE and StarOffice, for any TrueType (.ttf) and Type1 (.pfa, .pfb) fonts that you care to install - bitmap (.bdf, .pcf, .snf), and Speedo (.spd), fonts will also be installed, but these can only used by X.

When the module is started by a normal (non-root) user, then the settings will refer to their personal configuration, and installed fonts will be available to them only. For root, the settings will usually refer to the system-wide configuration, and as such any installed fonts should be available to all users.

The module has two main modes of operation:

The module has 3 main tabs, and these are described in detail below.

Fonts Tab

This tab is where the process of installing/uninstalling fonts takes place.

Installing a font is simply a matter of selecting the desired font in the "Install From" list, and pressing the "Install" button. In "Basic" mode, the "Change Folder" button may be used to select a different folder to install from. In "Advanced" mode, you must select a destination folder before the fonts may be installed.

Un-installing a font, again is simply a matter of selecting the desired font in the "Install To" list, and pressing the "Remove" button. This will either delete the font, or move it to a predefined folder - the configuration of this is performed in the "Settings" tab.

After you have finished installing and uninstalling fonts, you should then press the "Apply..." button - this 'activates' the changes, by altering the configuration files for X, XRender, Ghostscript, and StarOffice (for the rest of this help file, this process is referred to as the "Configure System" process).

Advanced Mode

In this mode, folders that are in X's font path are shown in bold, and those which are marked as "unscaled" are shown in italic.

When in "Advanced Mode", there is extra functionality available within the "Install to" list. This is activated by right clicking on an entry in the list. The functionality is:

Also added is the ability to install/uninstall complete folders.

Anti-Aliasing Tab

This section is only available if your system supports the XRender extension for anti-aliasing.

Changes made using this tab are saved either when the "Save Changes" button of this tab, or the "Apply..." button of the "Fonts" tab, are pressed.

The configurable options are:

Anti Alias - Advanced

The majority of the text in the following comes from a posting by Danny Tholen to KDE dot news

Xft Introduction

Xft is an interface to the freetype rasterizer written by Keith Packard, member of the XFree86 Project, Inc. It allows applications to use fonts from the new X render extension using a unified font naming scheme. In /etc/X11/XftConfig (or /usr/X11R6/lib/X11/XftConfig) you will find a configuration file which can be adapted to suit your personal taste. Each Xft config file is capable of including other files - e.g. the system Xft configuration file (mentioned previously), can include a personal Xft config file (~/.xftconfig), so that each user may customise Xft to suit their own needs. Xft has two methods of including other files:

In the rest of this document I will explain the syntax and demonstrate some things you can do with this file. Structure The basic structure revolves around a 'pattern'. A pattern is a set of name/valuelist pairs, each valuelist contains one or more typed values. A certain application requests a font, for example:

family: "Arial"

size: 12

encoding: "iso8859-1"

A size 12 arial font in latin-1 encoding. The Xft extension will now try to patch this pattern to all of the fonts available in the system. And selecting the one with the best score. Before the matching is done Xft looks in XftConfig. The requested pattern can here be extended before use. An example is:

match any family == "Arial" edit antialias = true;

This will enable antialiasing for all fonts of the family Arial.

Also, the X server is queried to list all of its fonts; the XLFD contains just enough information to match fonts roughly.

Here's a list of attributes used in matching fonts (in priority order, this may not be up to date anymore!):

Edit can be any of the above, plus:

How do I make aliases for my fonts?

I noted that my KDE console asks for ´mono´ fonts when it is looking for a fixed font. ´console´ is used when I select ´linux´ in the font menu of the KDE konsole. Therefore, I used two aliases for fonts which are also named ´fixed´:

match any family == "fixed" edit family =+ "mono";
match any family == "console" edit family =+ "mono";

Antialiasing my fonts makes me dizzy!

Although there is a big fuz around AA in X, good fonts actually look better if they are not antialiased. The antialiasing blurs the fonts by adding grey pixels to the edges, and this may strain your eyes if you looking at them for a long time. (Your eyes will try to get the fonts sharper, which ofcourse is not working because they are blurred;) However, for very small fonts, antialiasing may increase the readability of the fonts, because with sharp edges, there are to little pixels available for your mind to figure out what it means. And for bigger fonts, the edges become very jagged when not anitaliased, so here you also might want to have aliased fonts. Ofcourse you can also turn off the antialiasing for specific fonts. In other operating systems, most truetype fonts are not antialiased between 8 and 12 pixels, while only large Type1 fonts are antialiased.

Use the following in your XftConfig to antialias only fonts of specific sizes:

match
    any size > 8
    any size < 15
edit
    antialias = false;

My fixed fonts do not appear or look _very_ wrong in the KDE konsole or similar programs!

I noted that somehow a lot of fixed font do not tell Xft that they are fixed, and thus, mono spaced. Therefore only a part of the font is displayed. We can manually set the spacing for these fonts (this assumes you have fixed aliased with mono as in above):

match
    any family == "mono"
edit
    spacing = mono;

My Symbol, Webdings, etc. fonts do not show up!

For some reason some (symbol) fonts are not correctly recognized, and Xft will show your default font, or a font which has the closest match (which is generally not what you mean at all). For Adobe Symbol and MS-webdings I did the following to get them working:

match
    any family == "webdings"
edit
    antialias = false;
    encoding += "glyphs-fontspecific";


match
    any family == "symbol"
edit
    antialias = false;
    encoding += "glyphs-fontspecific";

A usefull way of figuring out these things is to activate debuging with

export XFT_DEBUG=1024

This will generate a lot of output, especially if you have many fonts, because it lists the properties and scores of every font available. You can also use other values. For a nice summary of what happens (requested font, XftConfig substitutions, x server additions and the finally matched font), you can use XFT_DEBUG=2.

Why do my KDE programs start now soooo slow?

Currently, the Xft mechanism in XFree 4.0.3 has to parse the XftConfig file each time a program is started. And the info of all these fonts has to be read. Newer versions (in CVS) will use a cache and are much faster. Especially if you have many fonts this can be a problem, and the only real solution is to upgrade to a CVS version of XFree.

I have a LCD screen, can I use subpixel hinting instead of normal antialiasing?

Yes you can. Subpixel hinting uses colors instead of grey pixels to do the AA. I do not have a LCD screen so I do not have any idea of how it looks but you can play with the rgba setting. Try

match edit rgba=bgr;

or use rgb if you have a different type of monitor. For vertical AA you can try vbgr and vbgr.

My fonts still look bad!

If you do not have some good truetype fonts, it is worth to go and look for them on the internet. Other reasons why your fonts still look bad can be because of your build of freetype2. Snapshots versions before 2.0.2 were compiled with an option that had some patent issues. Therefore, the standard 2.0.2 compiles without this option. To fix this, download the freetype2 source rpm and change in
include/freetype/config/ftoption.h line 314:

#undef TT_CONFIG_OPTION_BYTECODE_INTERPRETER

Settings Tab

This tab is used to customise the look and operation of the font installer.

Appearance

Here you can alter the look and operation of the "Fonts" tab.

Folders & Files

The installer needs to know the location of certain folders and files in order to function correctly, this section is where most of those may be entered/altered.

Install/Uninstall

This section is used to specify the options for installing and uninstalling fonts.

StarOffice

Here you can specify whether StarOffice (if you have it installed) should be configured.

Note: This only applies to StarOffice versions < 6 - and is not applicable to OpenOffice. (StarOffice v6 onwards, and OpenOffice, have much improved font handling.)

System

This section is used to specify system configuration options.