NAME

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

SYNTAX

char **XListFonts(Display *_d_i_s_p_l_a_y, char *_p_a_t_t_e_r_n, int _m_a_x_n_a_m_e_s, int *_a_c_t_u_a_l___c_o_u_n_t___r_e_t_u_r_n); int XFreeFontNames(char *_l_i_s_t[]); char **XListFontsWithInfo(Display *_d_i_s_p_l_a_y, char *_p_a_t_t_e_r_n, int _m_a_x_n_a_m_e_s, int *_c_o_u_n_t___r_e_t_u_r_n, XFontStruct **_i_n_f_o___r_e_t_u_r_n); int XFreeFontInfo(char **_n_a_m_e_s, XFontStruct *_f_r_e_e___i_n_f_o, int _a_c_t_u_a_l___c_o_u_n_t);

ARGUMENTS

_a_c_t_u_a_l___c_o_u_n_t Specifies the actual number of font names.

_a_c_t_u_a_l___c_o_u_n_t___r_e_t_u_r_n Returns the actual number of font names.
_c_o_u_n_t___r_e_t_u_r_n Returns the actual number of matched font names.
_d_i_s_p_l_a_y Specifies the connection to the X server.
_i_n_f_o___r_e_t_u_r_n Returns the font information.
_f_r_e_e___i_n_f_o Specifies the font information.

_l_i_s_t Specifies the array of strings you want to free.
_m_a_x_n_a_m_e_s Specifies the maximum number of names to be returned.
_n_a_m_e_s Specifies the list of font names.

_p_a_t_t_e_r_n Specifies the null-terminated pattern string that can contain wildcard
characters.

DESCRIPTION

The _X_L_i_s_t_F_o_n_t_s function returns an array of available font names (as controlled by the font search path; see _X_S_e_t_F_o_n_t_P_a_t_h) that match the string you passed to the pattern argument. 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, _X_L_i_s_t_F_o_n_t_s returns NULL. The client should call _X_F_r_e_e_F_o_n_t_N_a_m_e_s when finished with the result to free the memory.

The _X_F_r_e_e_F_o_n_t_N_a_m_e_s function frees the array and strings returned by _X_L_i_s_t_F_o_n_t_s or _X_L_i_s_t_F_o_n_t_s_W_i_t_h_I_n_f_o.

The _X_L_i_s_t_F_o_n_t_s_W_i_t_h_I_n_f_o 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 _X_L_o_a_d_Q_u_e_r_y_F_o_n_t 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, _X_L_i_s_t_F_o_n_t_s_W_i_t_h_I_n_f_o returns NULL.

To free only the allocated name array, the client should call _X_F_r_e_e_F_o_n_t_N_a_m_e_s. To free both the name array and the font information array or to free just the font information array, the client should call _X_F_r_e_e_F_o_n_t_I_n_f_o.

The _X_F_r_e_e_F_o_n_t_I_n_f_o function frees a font structure or an array of font structures and optionally an array of font names. If NULL is passed for names, no font names are freed. If a font structure for an open font (returned by _X_L_o_a_d_Q_u_e_r_y_F_o_n_t) is passed, the structure is freed, but the font is not closed; use _X_U_n_l_o_a_d_F_o_n_t to close the font.

SEE ALSO

XLoadFont(3X11), XSetFontPath(3X11)
_X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e