Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xlistfontswithinfo(3) [hpux man page]

XListFontsWithInfo()													      XListFontsWithInfo()

Name
  XListFontsWithInfo - obtain the names and information about available fonts.

Synopsis
  char **XListFontsWithInfo(display, pattern, maxnames,
	    count_return, info_return)
	Display *display;
	char *pattern;		/* NULL-terminated */
	int maxnames;
	int *count_return;
	XFontStruct **info_return;

Arguments
  display   Specifies a connection to an X server; returned from XOpenDisplay().

  pattern   Specifies  the  string associated with the font names you want returned.  You can specify any string, including asterisks (*) and
	    question marks (?).  The asterisk indicates a wildcard on any number of characters and the question mark indicates a wildcard  on
	    a single character.  Uppercase or lowercase is not important.  If the pattern string is not in the Host Portable Character Encod-
	    ing the result is implementation-dependent.

  maxnames  Specifies the maximum number of names that are to be in the returned list.

  count_return
	    Returns the actual number of matched font names.

  info_return
	    Returns a pointer to a list of font information structures.  XListFontsWithInfo() provides enough space for maxnames pointers.

Returns
  The list of font names.

Description
  XListFontsWithInfo() returns a list of font names that match the specified pattern and a also returns limited information about  each  font
  that	matches.   The list of names is limited to the size specified by the maxnames argument.  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  imple-
  mentation-dependent.

  XListFontsWithInfo() returns NULL if no matches were found.

  To  free  the  allocated  name  array, the client should call XFreeFontNames().  To free the font information array, the client should call
  XFreeFontInfo().

  The information returned for each font is identical to what XLoadQueryFont() would return, except that the per-character metrics (lbearing,
  rbearing, width, ascent, descent for single characters) are not returned.

  The font search path (the order in which font names in various directories are compared to pattern) is set by XSetFontPath().

  For more information on fonts, see Volume One, Chapter 6, Drawing Graphics and Text.

Structures
     typedef struct {
	 XExtData *ext_data;	     /* hook for extension to hang data */
	 Font fid;		     /* Font ID for this font */
	 unsigned direction;	     /* hint about direction the font is painted */
	 unsigned min_char_or_byte2; /* first character */
	 unsigned max_char_or_byte2; /* last character */
	 unsigned min_byte1;	     /* first row that exists */
	 unsigned max_byte1;	     /* last row that exists */
	 Bool all_chars_exist;	     /* flag if all characters have non-zero size */
	 unsigned default_char;      /* char to print for undefined character */
	 int n_properties;	     /* how many properties there are */
	 XFontProp *properties;      /* pointer to array of additional properties */
	 XCharStruct min_bounds;     /* minimum bounds over all existing char */
	 XCharStruct max_bounds;     /* maximum bounds over all existing char */
	 XCharStruct *per_char;      /* first_char to last_char information */
	 int ascent;		     /* logical extent above baseline for spacing */
	 int descent;		     /* logical descent below baseline for spacing */
     } XFontStruct;

See Also
  XCreateFontCursor(),	XFreeFont(),  XFreeFontInfo(),	XFreeFontNames(),  XFreeFontPath(), XGetFontPath(), XGetFontProperty(), XListFonts(),
  XLoadFont(), XLoadQueryFont(), XQueryFont(), XSetFont(), XSetFontPath(), XUnloadFont().

Xlib - Fonts														      XListFontsWithInfo()

Check Out this Related Man Page

XListFonts(3X11)						  XLIB FUNCTIONS						  XListFonts(3X11)

NAME
XListFonts, XFreeFontNames, XListFontsWithInfo, XFreeFontInfo - obtain or free font names and information SYNTAX
char **XListFonts(display, pattern, maxnames, actual_count_return) Display *display; char *pattern; int maxnames; int *actual_count_return; XFreeFontNames(list) char *list[]; char **XListFontsWithInfo(display, pattern, maxnames, count_return, info_return) Display *display; char *pattern; int maxnames; int *count_return; XFontStruct **info_return; XFreeFontInfo(names, free_info, actual_count) char **names; XFontStruct *free_info; int actual_count; ARGUMENTS
actual_count Specifies the actual number of font names. actual_count_return Returns the actual number of font names. count_return Returns the actual number of matched font names. display Specifies the connection to the X server. info_return Returns the font information. free_info Specifies the font information. list Specifies the array of strings you want to free. maxnames Specifies the maximum number of names to be returned. names Specifies the list of font names. pattern Specifies the null-terminated pattern string that can contain wildcard characters. DESCRIPTION
The XListFonts function returns an array of available font names (as controlled by the font search path; see XSetFontPath) 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 num- ber 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 Por- table Character Encoding. Otherwise, the result is implementation-dependent. If there are no matching font names, XListFonts returns NULL. The client should call XFreeFontNames when finished with the result to free the memory. The XFreeFontNames function frees the array and strings returned by XListFonts or XListFontsWithInfo. 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. The XFreeFontInfo 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 XLoadQueryFont) is passed, the structure is freed, but the font is not closed; use XUnloadFont to close the font. SEE ALSO
XLoadFont(3X11), XSetFontPath(3X11) Xlib - C Language X Interface X Version 11 Release 6.6 XListFonts(3X11)
Man Page