1XListFonts(3)                   XLIB FUNCTIONS                   XListFonts(3)
2
3
4

NAME

6       XListFonts, XFreeFontNames, XListFontsWithInfo, XFreeFontInfo - obtain
7       or free font names and information
8

SYNTAX

10       char **XListFonts(Display *display, char *pattern, int maxnames, int
11              *actual_count_return);
12
13       int XFreeFontNames(char *list[]);
14
15       char **XListFontsWithInfo(Display *display, char *pattern, int max‐
16              names, int *count_return, XFontStruct **info_return);
17
18       int XFreeFontInfo(char **names, XFontStruct *free_info, int
19              actual_count);
20

ARGUMENTS

22       actual_count
23                 Specifies the actual number of font names.
24
25
26       actual_count_return
27                 Returns the actual number of font names.
28
29       count_return
30                 Returns the actual number of matched font names.
31
32       display   Specifies the connection to the X server.
33
34       info_return
35                 Returns the font information.
36
37       free_info Specifies the font information.
38
39
40       list      Specifies the array of strings you want to free.
41
42       maxnames  Specifies the maximum number of names to be returned.
43
44       names     Specifies the list of font names.
45
46
47       pattern   Specifies the null-terminated pattern string that can contain
48                 wildcard characters.
49

DESCRIPTION

51       The XListFonts function returns an array of available font names (as
52       controlled by the font search path; see XSetFontPath) that match the
53       string you passed to the pattern argument.  The pattern string can con‐
54       tain any characters, but each asterisk (*) is a wildcard for any number
55       of characters, and each question mark (?) is a wildcard for a single
56       character.  If the pattern string is not in the Host Portable Character
57       Encoding, the result is implementation-dependent.  Use of uppercase or
58       lowercase does not matter.  Each returned string is null-terminated.
59       If the data returned by the server is in the Latin Portable Character
60       Encoding, then the returned strings are in the Host Portable Character
61       Encoding.  Otherwise, the result is implementation-dependent.  If there
62       are no matching font names, XListFonts returns NULL.  The client should
63       call XFreeFontNames when finished with the result to free the memory.
64
65       The XFreeFontNames function frees the array and strings returned by
66       XListFonts or XListFontsWithInfo.
67
68       The XListFontsWithInfo function returns a list of font names that match
69       the specified pattern and their associated font information.  The list
70       of names is limited to size specified by maxnames.  The information
71       returned for each font is identical to what XLoadQueryFont would return
72       except that the per-character metrics are not returned.  The pattern
73       string can contain any characters, but each asterisk (*) is a wildcard
74       for any number of characters, and each question mark (?) is a wildcard
75       for a single character.  If the pattern string is not in the Host Por‐
76       table Character Encoding, the result is implementation-dependent.  Use
77       of uppercase or lowercase does not matter.  Each returned string is
78       null-terminated.  If the data returned by the server is in the Latin
79       Portable Character Encoding, then the returned strings are in the Host
80       Portable Character Encoding.  Otherwise, the result is implementation-
81       dependent.  If there are no matching font names, XListFontsWithInfo
82       returns NULL.
83
84       To free only the allocated name array, the client should call XFree‐
85       FontNames.  To free both the name array and the font information array
86       or to free just the font information array, the client should call
87       XFreeFontInfo.
88
89       The XFreeFontInfo function frees a font structure or an array of font
90       structures and optionally an array of font names.  If NULL is passed
91       for names, no font names are freed.  If a font structure for an open
92       font (returned by XLoadQueryFont) is passed, the structure is freed,
93       but the font is not closed; use XUnloadFont to close the font.
94
95       Note that XListFontsWithInfo is not thread-safe. If other threads make
96       X requests on the same Display, then this function's behavior is unde‐
97       fined.
98

SEE ALSO

100       XLoadFont(3), XSetFontPath(3)
101       Xlib - C Language X Interface
102
103
104
105X Version 11                     libX11 1.6.7                    XListFonts(3)
Impressum