Font configuration and customization has traditionally been left to each application. Fontconfig is a library designed to provide a common system that can serve to ease application development and provide users with the ability to confidently install new fonts with the expectation that they will be used by most applications. Fontconfig provides the ability for multiple configuration interfaces to affect a wide range of systems without requiring custom code for each new system. Fontconfig provides a range of services to allow applications to pick those appropriate without being forced to use the entire interface. Wide acceptance of the Fontconfig mechanisms will improve system consistency without requiring a radical redesign of existing applications.
The original ideas for Fontconfig came about during the design and deployment of the Xft library[xft]. Xft was originally designed to connect fonts rasterized with the FreeType[freetype] library with the X Render Extension[render] to the X window system[x]. As FreeType provided no font configuration or customization mechanisms, Xft included its own. Extending the problem of font configuration by creating yet another incompatible configuration file format.
During a subsequent redesign of Xft, the configuration and customization portions of the library were extracted and moved into a separate library with the idea that they would be more useful if shared with other applications. The development of Xft-based desktop environments included the ability to configure Xft font selection. The need to embed the parser for the custom Xft configuration language made it evident that a standard configuration file format was required. Even though popular, it seemed that XML[xml] would be a good fit for this task.
Development of Mozilla[mozilla] and Pango[pango] on top of Xft demanded additional information about fonts during the selection process. Fontconfig now collects a significant amount of information about every font in the system to aid in selecting appropriate fonts. The basic font matching mechanism inherited from Xft has proven effective and has characteristics similar to the font selection algorithm from the second version of the W3C Cascading Style Sheets Specification[css2]. Modest changes in Fontconfig will yield a matching system that can easily be adapted to provide full CSS2 semantics for Mozilla or other web browsers.
While Fontconfig continues to be under development, the API has stabilized enough for active application development. It is time to plan the migration of existing applications to this new font configuration mechanisms and to add the ability to modify this font configuration to the desktop environment.