| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version |
Arguments: struct
Returns the maximum height of a character from the baseline for the
fontmetrics
structure specified by the argument. This height measured in stream
units of the stream associated with the argument, which must be a
fontmetrics
object.
There are font
methods for the graphical-stream
class (formerly
called windows-graphics
) and subclasses of it, for
various dialog-item
classes that display
text, and for grid-subsection
and outline-item
.
The setf of this
function may be called to set the current font of the object. The
setf takes an
additional optional argument called
set-line-height-too. This is used only when the
object is a graphical-stream
(which includes
windows and other objects on which drawing may be done). When true,
the line-height
of the stream is set to the font-height of the font. The
default value is t
; this is usually the
appropriate value, so that newlines printed to the stream will advance
the current y position as appropriate for this font. Therefore a font
is typically set with a form such as this:
(setf (font my-window) (make-font-ex nil "Arial" 18))
though to avoid changing the window's line-height you could instead use this:
(setf (font my-window nil)(make-font-ex nil "Arial" 18))
The font of an object may also be set by passing a
:font
initarg when creating the object, and by
calling with-font.
Regarding outline-item
s: while the font of an
individual outline-item
may be set, all of the
items in the outline will retain the same height, which is the font-height of the
font of the
outline
. For
this reason, the font of an outline-item
should not be taller
than the general font of the outline, or else the text will be
clipped.
See also Text and Fonts in cg-drawing.htm.
Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.2 page.
Created 2012.5.30.
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version |