4 Fonts

4.2 Using fonts

The Window Tool Kit maintains a registry of all fonts in the window system. Whenever you load a new font into the window system, the font is stored in the font registry. A font can be referenced as a string, as a symbol, or as a font descriptor. Any function that takes a font as an argument can be given a string or symbol instead. To display all of the fonts in the font registry, invoke the function print-fonts. You can use the functionmap-registry to map a function over the contents of the registry.

When the Window Tool Kit or Editor has been initialized, the variable *default-font* contains the font that is used for all text operations. You can use the function load-font to load other fonts if they are not present in the image. To determine if a particular font is part of the font registry, use the function find-font. You can store a font in a file by using the function store-font.

4.2.1 - Formatting text output
4.2.2 - Printing text output
4.2.3 - Changing fonts
4.2.4 - X11 fonts

The Window Tool Kit - 9 SEP 1996

Generated with Harlequin WebMaker