Generic Function | Package: cg | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version

## font-reader

Arguments: grid-column

Returns a function that returns the font to use when drawing each grid cell of a a particular column, or else returns `nil` to determine the font in other ways. This function is called by the default cell-font method, which in turn is typically called by a draw-cell method (including those supplied by `editable-text-column-mixin` and other mixins). A font-reader may be `nil` rather than a function if this facility is not used. The default value is `nil`.

The font-reader function is a property of a particular `grid-column`, and is called once for each `grid-row` that intersects that column, to determine the font of the cell at the intersection of that row and column. The function should take one argument, which is the data-object of the `grid-row`. If the font for a particular cell should be determined by the font-reader function, then it should return the font to use, and otherwise it should return `nil`.

This property value may be specified as either a function name symbol (which would be more debuggable), or a function object (which may be slightly faster, though probably insignificantly), or `nil`.

An application does not call the font-reader function; it supplies the font-reader function by calling (setf font-reader) or by passing the :font-reader initarg when calling make-instance to create a `grid-column`, and the specified function is then called automatically by the system as needed.

See the `grid-widget` class for an overview of writing grid-widget code.

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.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version