Arguments: font &key stream
Returns the actual font that is being used for some requested font.
The returned font will be equivalent to the requested font if the requested font is an available font, and otherwise will be the approximation to it that the Operating System has decided to use in its place. For example,
(exact-font (make-font-ex nil :|ms sans serif| 8))
may return
#.(make-font-ex :swiss :|ms sans serif| 13)
since there are only a couple of sizes for that font face available, and the "family" is always filled in.
For the special system fonts returned by the functions system-font, system-fixed-font, ansi-var-font, and ansi-fixed-font, exact-font can be used to find the face and size that each of these special fonts is mapped to by the Operating System. For example,
(exact-font (system-fixed-font))
may return
#.(make-font-ex :modern :fixedsys 18).
NOTE: If neither font nor any other font object that has the same
properties (family, face, size, and bold/italic) as font has been
assigned to any window yet, then exact-font will return nil
because the Operating System has not yet been
asked to create a real Operating System font for this font object. So
exact-font is normally called on a font that has been assigned to a
window with (setf font) or the :font initarg of make-window. If you would
like to call exact-font before creating the
window that will use the font, as a work-around you could use (setf
font) to set the font of (screen *system*
) to the font before
calling exact-font on the font.
Common Graphics and IDE documentation is described in About Common Graphics and IDE documentation in cgide.htm.
The documentation is described in introduction.htm and the index is in index.htm.
Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.
Created 2000.10.5.