Skip to content

Requirements for the Font library

To avoid miles of duplicate code in the X server, the font server and the various font manipulation tools, the font library should provide interfaces appropriate for all of these tasks. In particular, the X server and font server should be able to both use the library to access disk based fonts, and to communicate with a font server. By providing a general library, we hoped to avoid duplicating code between the X server and font server.

Another requirement is that the X server (or even a font server) be able to continue servicing requests from other clients while awaiting a response from the font server on behalf of one client. This is the strongest requirement placed on the font library, and has warped the design in curious ways. Because both the X server and font server are single threaded, the font library must not suspend internally, rather it returns an indication of suspension to the application which continues processing other things, until the font data is ready, at which time it restarts the suspended request.

Because the code for reading and manipulating bitmap font data is used by the font applications mkfontdir and bdftopcf, the font library includes bitmap-font specific interfaces which those applications use, instead of the more general interfaces used by the X and font servers, which are unaware of the source of the font data. These routines will be refered to as the bitmap font access methods.