12.07.2015 Views

Xlib − C Language X Interface

Xlib − C Language X Interface

Xlib − C Language X Interface

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Xlib</strong> − C LibraryX11, Release 6.7 DRAFT8.5.2. Obtaining and Freeing Font Names and InformationYouobtain font names and information by matching a wildcard specification when querying afont type for a list of available sizes and so on.To return a list of the available font names, use XListFonts.char **XListFonts (display, pattern, maxnames, actual_count_return)Display *display;char *pattern;int maxnames;int *actual_count_return;displaypatternmaxnamesSpecifies the connection to the X server.Specifies the null-terminated pattern string that can contain wildcard characters.Specifies the maximum number of names to be returned.actual_count_returnReturns the actual number of font names.The XListFonts function returns an array of available font names (as controlled by the fontsearch path; see XSetFontPath) that match the string you passed to the pattern argument. Thepattern string can contain any characters, but each asterisk (*) is a wildcard for any number ofcharacters, and each question mark (?) is a wildcard for a single character. Ifthe pattern string isnot in the Host Portable Character Encoding, the result is implementation-dependent. Use ofuppercase or lowercase does not matter. Each returned string is null-terminated. If the datareturned by the server is in the Latin Portable Character Encoding, then the returned strings are inthe Host Portable Character Encoding. Otherwise, the result is implementation-dependent. Ifthere are no matching font names, XListFonts returns NULL. The client should call XFree-FontNames when finished with the result to free the memory.To free a font name array, use XFreeFontNames.XFreeFontNames (list)char *list[];listSpecifies the array of strings you want to free.The XFreeFontNames function frees the array and strings returned by XListFonts or XList-FontsWithInfo.To obtain the names and information about available fonts, use XListFontsWithInfo.167

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!