(Translated by https://www.hiragana.jp/)
Xlib Programming Manual: XListFontsWithInfo
XListFontsWithInfo
Syntax
char **XListFontsWithInfo(display, pattern, maxnames, count_return, info_return)
Display *display;
char *pattern;
int maxnames;
int *count_return;
XFontStruct **info_return;
Arguments
display
| Specifies the connection to the X server.
|
pattern
| Specifies the null-terminated pattern string that can contain wildcard
characters.
|
maxnames
| Specifies the maximum number of names to be returned.
|
count_return
| Returns the actual number of matched font names.
|
info_return
| Returns the font information.
|
Description
The
XListFontsWithInfo()
function returns a list of font names that match the specified pattern and their
associated font information.
The list of names is limited to size specified by maxnames.
The information returned for each font is identical to what
XLoadQueryFont()
would return except that the per-character metrics are not returned.
The pattern string can contain any characters,
but each asterisk (*) is a wildcard for any number of characters,
and each question mark (?) is a wildcard for a single character.
If the pattern string is not in the Host Portable Character Encoding,
the result is implementation dependent.
Use of uppercase or lowercase does not matter.
Each returned string is null-terminated.
If the data returned by the server is in the Latin Portable Character Encoding,
then the returned strings are in the Host Portable Character Encoding.
Otherwise, the result is implementation dependent.
If there are no matching font names,
XListFontsWithInfo()
returns NULL.
To free only the allocated name array,
the client should call
XFreeFontNames().
To free both the name array and the font information array
or to free just the font information array,
the client should call
XFreeFontInfo().
See also
XFreeFontInfo(),
XFreeFontNames(),
XListFonts(),
XLoadFont(),
XSetFontPath(),
"Obtaining and Freeing Font Names and Information".
Christophe Tronche, ch@tronche.com