Next Prev Up

8.3 Listing Fonts

The following paragraphs describe CLX functions that return fonts or font names that match a given pattern string. Such pattern strings should contain only ISO Latin-1 characters; case is not significant. The following pattern characters can be used for wildcard matching:

#\*
Matches any sequence of zero or more characters.
#\?
Matches any single character.

For example, the pattern "T?mes Roman" matches the name "Times Roman" but not the name "Thames Roman". However, the pattern "T*mes Roman" matches both names.


font-path display &key ( :result-type 'list) Function
     
display
A display object.
:result-type
Specifies the type of resulting sequence.

Returns a list (by default) of names containing the current search path for fonts. With setf, this function sets the search path for font lookup. There is only one search path per server, not one per client. The interpretation of the names is server-dependent, but they are intended to specify directories to be searched in the order listed.

Setting the path to the empty list restores the default path defined for the server. Note that as a side-effect of executing this request, the server is guaranteed to flush all cached information about fonts for which there are currently no explicit resource IDs allocated.

paths
Type sequence of either string or pathname .

list-font-names display pattern &key (:max-fonts 65535) (:result-type 'list) Function
     
display
A display object.
pattern
A string used to match font names. Only font names that match the pattern are returned.
:max-fonts
The maximum number of font names returned. Default is 65535.
:result-type
The type of sequence to return. Default is 'list.

Returns a sequence of strings containing the font names that match the pattern. The fonts available are determined by the font search path; see font-path). The maximum number of font names returned is determined by :max-fonts.

font-name
Type sequence of string.

list-fonts display pattern &key (:max-fonts 65535) (:result-type 'list) Function
     
display
A display object.
pattern
A string used to match font names. Only fonts whose name matches the pattern are returned.
:max-fonts
The maximum number of fonts returned. Default is 65535.
:result-type
The type of sequence to return. Default is 'list.

Returns a sequence of pseudo-fonts corresponding to the available fonts whose names match the pattern. The fonts available are determined by the font search path; see font-path). The maximum number of font objects returned is determined by :max-fonts.

font
Type sequence of font.

Next Prev Up
© 1988, 1989 Texas Instruments Incorporated
Conversion to HTML made by Gilbert Baumann.
Last build: Tue Dec 16 23:30:42 1997