---
name: "XmFontList"
section: "3"
platform: "linux"
package: "openmotif"
version: "2.3.8-4"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/XmFontList"
---

# XmFontList(3)

Data type for a font list

## NAME

**XmFontList** — Data type for a font list

## SYNOPSIS

```
#include <Xm/Xm.h>
```

## DESCRIPTION

**XmFontList** is the data type for a font list. A font list consists of font list entries. Each entry contains a font or a font set (a group of fonts) and is identified with a tag, which is optional. If this tag is NULL, the tag is set to **XmFONTLIST\_DEFAULT\_TAG**.

The value of **XmFONTLIST\_DEFAULT\_TAG** is **XmFONTLIST\_DEFAULT\_TAG\_STRING**.

When a compound string is displayed, the font list element tag of the compound string segment is matched with a font list entry tag in the font list and the matching font list entry is used to display the compound string. A font list entry is chosen as follows:

- •

  The first font list entry whose tag matches the tag of the compound string segment is used.

- •

  If no match has been found and if the tag of the compound string segment is **XmFONTLIST\_DEFAULT\_TAG**, the first font list entry whose tag matches the tag that would result from creating an entry with **XmSTRING\_DEFAULT\_CHARSET** is used. For example, if creating an entry with **XmSTRING\_DEFAULT\_CHARSET** would result in the tag **ISO8859-1**, the compound string segment tag **XmFONTLIST\_DEFAULT\_TAG** matches the font list entry tag **ISO8859-1**.

- •

  If no match has been found and if the tag of the compound string segment matches the tag that would result from creating a segment with **XmSTRING\_DEFAULT\_CHARSET**, the first font list entry whose tag is **XmFONTLIST\_DEFAULT\_TAG** is used.

- •

  If no match has been found, the first entry in the font list is used.

The font list interface consists of the routines listed in **Related Information**.

Font lists are specified in resource files with the following syntax:

```
resource_spec:  font_entry [, font_entry ]+
```

The resource value string consists of one or more font list entries separated by commas. Each *font\_entry* identifies a font or font set and an optional font list entry tag. A tag specified for a single font follows the font name and is separated by = (equals sign); otherwise, in a font set the tag is separated by a colon. The colon is required whether a tag is specified or not. A font entry uses the following syntax to specify a single font:

```
font_name [ '=' tag ]
```

For example, the following entry specifies a 10 point Times Italic font without a font list entry tag;

```
*fontList:  -Adobe-Times-Medium-I-Normal--10*
```

A font entry containing a font set is similar, except a semicolon separates multiple font names and the specification ends with a colon followed by an optional tag:

```
font_name [ ';' font_name ]+ ':' [ tag ]
```

A *font\_name* is an X Logical Font Description (XLFD) string and *tag* is any set of characters from ISO646IRV except space, comma, colon, equal sign and semicolon. Following is an example of a font set entry. It consists of three fonts (except for charsets), and an explicit font list entry tag.

```
*fontList: -Adobe-Courier-Bold-R-Normal--25-180-100-100-M-150;-JIS-Fixed-Medium-R-Normal--26-180-100-100-C-240;-JIS-Fixed-Medium-R-Normal--26-180-100-100-C-120:MY_TAG
```

Note that the **XmRenderTable** is another data type that can be used for font lists. Refer to the [**XmRenderTable**(3)](/XmRenderTable/3.md) for details.

## RELATED

[**XmFontListAdd**(3)](/XmFontListAdd/3.md), [**XmFontListAppendEntry**(3)](/XmFontListAppendEntry/3.md), [**XmFontListCopy**(3)](/XmFontListCopy/3.md), [**XmFontListCreate**(3)](/XmFontListCreate/3.md), [**XmFontListEntryCreate**(3)](/XmFontListEntryCreate/3.md), [**XmFontListEntryFree**(3)](/XmFontListEntryFree/3.md), [**XmFontListEntryGetFont**(3)](/XmFontListEntryGetFont/3.md), [**XmFontListEntryGetTag**(3)](/XmFontListEntryGetTag/3.md), [**XmFontListEntryLoad**(3)](/XmFontListEntryLoad/3.md), [**XmFontListFree**(3)](/XmFontListFree/3.md), [**XmFontListFreeFontContext**(3)](/XmFontListFreeFontContext/3.md), [**XmFontListGetNextFont**(3)](/XmFontListGetNextFont/3.md), [**XmFontListInitFontContext**(3)](/XmFontListInitFontContext/3.md), [**XmFontListNextEntry**(3)](/XmFontListNextEntry/3.md), [**XmFontListRemoveEntry**(3)](/XmFontListRemoveEntry/3.md), [**XmRenderTable**(3)](/XmRenderTable/3.md), and [**XmString**(3)](/XmString/3.md).
