XMFONTLISTGETNEXTFONT(3)

πŸ“¦
version 2.3.8 Β· 3 versions
, in arch rolling, centos-stream 9, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

πŸ’– NAME πŸ’–

XmFontListGetNextFont β€” a font list function that lets your app peek at all the fonts and character sets chillin' inside a font list πŸŽ€


✨ SYNOPSIS ✨

#include <Xm/Xm.h>
Boolean XmFontListGetNextFont(
XmFontContext context,
XmStringCharSet *charset,
XFontStruct **font);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay bestie, listen. XmFontListGetNextFont walks up to the next entry in your font list and hands you its character set and its font. That's it, that's the whole vibe. πŸ’…

Here's the routine, fr fr:

  1. First you gotta call XmFontListInitFontContext to make yourself a font list context. no context, no entry, periodt.
  2. Then you call XmFontListGetNextFont over and over with that same context. Every single call scoops up the next element of the font list. it's giving little cursor energy πŸ‘‘
  3. When you're done, you call XmFontListFreeFontContext to free that allocated context. don't ghost it, bestie 😭
⚠️ heads up: this routine allocates memory for the character set string, and you (the application) have to free it. The function allocates memory for charset. Managing that memory is 100% on you. You can recover it by calling XtFree. not optional, not a drill. 🫢
πŸ’€ obsolete alert: this function is obsolete and only exists for compatibility with previous releases. It's been replaced by XmFontListNextEntry. Also β€” if you pass XmFontListGetNextFont a context that contains a font set entry, it will return the first font of the font set, and the next call to the function will move on to the next entry in the font list. lowkey important, don't skip this part.

Now the arguments, one by one 🌸:

  • context β€” specifies the font list context. your lil' bookmark in the list, basically.
  • charset β€” specifies a pointer to a character set string; the routine returns the character set for the current font list element. so it's a pointer you hand over and it fills in the tea πŸ“
  • font β€” specifies a pointer to a pointer to a font structure; the routine returns the font for the current font list element. pointer-to-a-pointer, yes, it's that kind of party ✨

🌈 RETURN 🌈

Returns True if the returned values are valid. Otherwise, it returns False. simple as that, no cap πŸ’œ



and that's the whole page, bestie!! πŸŽ€ this was XmFontListGetNextFont(library call) β€” yes, the manual name is literally baked into the header and the footer, it said it twice because it's an icon πŸ’… go forth and iterate those font lists, you absolute main character πŸ¦‹β­