Fontconfig/fr

La bibliothèque  a pour but de permettre une uniformisation de la configuration entre les différents GUI. Bien qu'il soit commun de pouvoir configurer les polices dans un Desktop environment, reste une bibliothèque sous-jacente.

Installation
Le paquet est souvent installé automatiquement. Si ce n'est pas le cas, assurez vous que le système graphique (comme X ou Wayland) et un desktop environment sont installés.

Options de la variable USE
n'utilise pas beaucoup d'option USE.

Generique
utilise des fichiers XML dans le dossier pour sa configuration. Il utilise par défaut (les utilisateurs ne doivent pas éditer ce fichier !) qui met en place des configurations par défaut et contient du code renvoyant vers  pour la configuration. Le dossier contient différents fichiers de configuration qui couvrent chacun différents aspects de. Il y a généralement des liens symboliques allant des fichiers nécessaires vers. Ces fichier sont exécutés dans l'ordre de leur nom. C'est pour cela que leur noms commencent par un nombre à deux chiffres. Le premier chiffre (les dizaines) indique à quoi le fichier s'applique (on l'appelle la classe).

Ressources spécifiques à Gentoo
Gentoo propose le module eselect qui fait exactement ce qui a été décrit de façon simple : il gère les liens symboliques dans le dossier. Changer les configurations avec ce module requiert les permissions appropriées.

La sous section suivante explique comment se servir du module de eselect.

Lister les fichiers disponibles
La commande montre les fichiers de configuration de  disponibles, et marque les fichiers activés avec une astérisque.

Activer une police
Les polices peuvent être activées soit en indiquant le chemin du fichier, soit en utilisant le nombre entre crochets. Ainsi, les deux commandes suivantes font la même chose :

Désactiver une police
Les polices peuvent être désactivées comme suit :

Configuration avancées du système
Pour faire une fichier spécial, activez  et créez  le fichier XML.

To be clear, this says that when it comes to sans-serif fonts, we prefer using Ubuntu, TakaoPGothic, and Droid Sans fonts (in that order) over DejaVu Sans (which can be used as a default choice only when necessary). Obviously, different choices can be made here.

Per-user configuration
To create per-user files, enable  (which might be enabled by default), and have the end users use the  file. This file has the same XML format as.

Checking configuration
Check the default font replacement, for example for Arial, by typing:

Anti-aliasing, hinting, and sub-pixel rendering
Rendering aspects can be tuned as well. In the following sections the Anti-aliasing, Hinting and Sub-pixel rendering features are tuned.

Forcing hinting
The default behavior regarding hinting is rather undocumented, but it can be made deterministically sub-optimal by making a system wide default.


 * 1) First enable
 * 2) Edit the  file to include full hinting by default

This snippet enables full hinting:

Using sub-pixel rendering
It's important to determine the sub-pixel layout of the LCD matrix. It's usually RGB but the only way to be sure is to either consult display specification or use this sub-pixel layout test to determine it.

Once determined, enable the appropriate file.

It's strongly advised that, if available, is used with sub-pixel rendering. It comes in different varieties but the default should be appropriate for all common fonts.

Regarding autohinter
Autohinter attempts to do automatic hinting disregarding any existing hinting information. Until recently it was the default because TrueType2 was covered by patents but now that they have expired there's very little reason to use it. From technical point of view it does better than broken or no hinting information but it will be strongly sub-optimal for fonts with good hinting information. Generally system fonts are of the second kind so autohinter should not be used.

Infinality
Infinality is a (somewhat controversial) set of patches for FreeType and accompanying files. The goal of Infinality is to provide higher quality font rendering including emulation of other OS font rendering styles.

Enabling Infinality
Enable the 'infinality' USE flag by editing either manually or by using the  tool.

Next, rebuild the affected programs.

Unless messages shown after rebuild tell otherwise, enable.

Configuring Infinality
Infinality can be configured in various ways including custom configurations, but easiest is to use pre-made profiles shipped in that along with eselect modules should have been installed as dependencies of the   USE flag.

Quick and reasonable config
It's also recommended to disable all settings except for  as they interfere with the rendering of infinality styles:

Certain settings do not interfere with how the fonts are rendered, but rather determine the default fonts for font-types (such as Monospace, sans-serif, etc.). Such settings (for example the configurations) can be left enabled.

Explanation
Infinality provides FreeType environment variables that can be used to configure features introduced with its patches as well as files to be used with these changes. file sets are administrated on Gentoo via while the FreeType behaviour is set using.

These eselect modules function as usual:


 * Listing available file sets.


 * Listing available FreeType variable sets.


 * Both sets should match of course except when there are multiple matches possible such as shown below.

Picking fonts
Choosing the right font can be trickier than deciding on the right hinting type. For one reason or another, some fonts will never be perfect — but it's certainly possible to make them look better than, say, the Windows 7 default font configuration.

Here are some recommendations regarding well known fonts in Gentoo:

External resources

 * In-depth articles from Arch Linux wiki on:
 * Font configuration
 * Infinality
 * Official documentation for users
 * Wikipedia article on font hinting