Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

XLoadFont(3X11)

XSetFontPath(3X11)

XListFonts(3X11)  —  X Version 11 (1 September 1988)

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_countSpecifies the actual number of matched font names returned by XListFontsWithInfo.

actual_count_return
Returns the actual number of font names.

count_returnReturns the actual number of matched font names. 

displaySpecifies the connection to the X server. 

info_returnReturns a pointer to the font information. 

free_infoSpecifies the pointer to the font information returned by XListFontsWithInfo.

listSpecifies the array of strings you want to free. 

maxnamesSpecifies the maximum number of names to be returned. 

namesSpecifies the list of font names returned by XListFontsWithInfo.

patternSpecifies 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 string should be ISO Latin-1; uppercase and lowercase do not matter. Each string is terminated by an ASCII null. 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. 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. To free the allocated name array, the client should call XFreeFontNames. To free the the font information array, the client should call XFreeFontInfo.

The XFreeFontInfo function frees the the font information array.

SEE ALSO

XLoadFont(3X11), XSetFontPath(3X11)
Xlib − C Language X Interface

September 29, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026