XMFONTLISTENTRYLOAD(3)
π NAME π
XmFontListEntryLoad β bestie, this is a font list function that loads a font or creates a font set, and then creates an accompanying font list entry to go with it. It's giving matchmaker for fonts and font lists, fr fr π«Ά
π SYNOPSIS π
#include <Xm/Xm.h>
XmFontListEntry XmFontListEntryLoad(
Display *display,
char *font_name,
XmFontType type,
char *tag);
β¨ DESCRIPTION β¨
Okay so here's the vibe: XmFontListEntryLoad loads a font or creates a font set, and which one it does depends entirely on the value of the type argument. Then it creates and returns a font list entry that holds the font or font set plus the tag you gave it. Iconic behavior, no notes π
If the value of type is XmFONT_IS_FONT, the function uses the XtCvtStringToFontStruct routine to convert the value of font_name into a font struct. If the value of type is XmFONT_IS_FONTSET, the function uses the XtCvtStringToFontSet converter to create a font set in the current locale. Either way, XmFontListEntryLoad creates a font list entry containing the font or font set that came out of the converter. For more info about XtCvtStringToFontStruct and XtCvtStringToFontSet, go read X Toolkit IntrinsicsβC Language Interface. It's the required reading, sorry bestie π
- display β specifies the display where the font list will be used. π₯οΈ
- font_name β specifies an X Logical Font Description (XLFD) string, which gets interpreted either as a font name or as a base font name list. Heads up: a base font name list is a comma-separated and NULL-terminated string. Commas AND a NULL terminator, don't forget the second one πΈ
- type β specifies whether the font_name argument refers to a font name or to a base font name list. Valid values are
XmFONT_IS_FONTandXmFONT_IS_FONTSET. Only those two, no free styling π - tag β specifies the tag of the font list entry to be created. You may specify it as
XmFONTLIST_DEFAULT_TAG, which is what gets used to identify the default font list element in a font list when it's specified as part of a resource. Default-tag energy, we love to see it β¨
π₯ RETURN π₯
Here's where it gets real, so pay attention:
If the specified font is not found, or if the specified font set cannot be created, then either an implementation-defined font will be opened or a font set will be created, and a warning message will be generated. Not a drill, just a heads-up π
And if no suitable font can be found or a font set cannot be created, then another message gets generated and the function will return NULL. That's the sad ending. π
Otherwise? The function returns a font list entry. π
And if it does return a font list entry, bestie, listen: the function allocates space to hold that font list entry. The application is responsible for managing the allocated space. That's on you, not on it. The application can recover the allocated space by calling XmFontListEntryFree. Free your memory, queen π§
π RELATED π
XmFontList(3), XmFontListAppendEntry(3), XmFontListEntryCreate(3), XmFontListEntryFree(3), XmFontListEntryGetFont(3), XmFontListEntryGetTag(3), and XmFontListRemoveEntry(3).
Go read those too, iykyk π
And that's the whole page, bestie β straight from the XmFontListEntryLoad(library call) manual, the one and only. It's a library call page, so treat it with the respect of a library call page. Now go load some fonts and slay πβ¨π
π¦ where this page comes from
- arch rolling: openmotif 2.3.8-4 Β· LGPL-2.1-or-later
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- centos-stream 9: motif-devel 2.3.4-32.el9 Β· LGPLv2+
- epel 10: motif-devel 2.3.8-2.el10_2 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-1.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 43: motif-devel 2.3.8-2.fc43 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- fedora 44: motif-devel 2.3.8-3.fc44 Β· LicenseRef-Callaway-LGPLv2+
- nixos 26.05: motif 2.3.8
- nixpkgs unstable: motif 2.3.8
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: motif-devel 2.3.8-bp160.1.1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms