xcb_list_fonts(3)

๐Ÿ“ฆ
version 1.17.0 ยท 4 versions
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, debian trixie, fedora 43, fedora 44, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

๐Ÿ’… xcb_list_fonts

okay bestie, welcome to xcb_list_fonts from the XCB Requests girlies โœจ this one lives in libxcb (the X protocol binding situation) and it's literally just: "hey server, gimme the font names that match this pattern" ๐ŸŽ€


โœจ NAME โœจ

xcb_list_fonts โ€” get matching font names ๐Ÿฆ‹


โœจ SYNOPSIS โœจ

#include <xcb/xproto.h>

๐Ÿซถ Request function

xcb_list_fonts_cookie_t xcb_list_fonts(xcb_connection_t *conn,
       uint16_t max_names, uint16_t pattern_len, const char *pattern);

๐ŸŒธ Reply datastructure

typedef struct xcb_list_fonts_reply_t {
    uint8_t  response_type;
    uint8_t  pad0;
    uint16_t sequence;
    uint32_t length;
    uint16_t names_len;
    uint8_t  pad1[22];
} xcb_list_fonts_reply_t;

๐ŸŽ€ Reply function

xcb_list_fonts_reply_t *xcb_list_fonts_reply(xcb_connection_t *conn,
       xcb_list_fonts_cookie_t cookie, xcb_generic_error_t **e);

๐Ÿ’– Reply accessors

int xcb_list_fonts_names_length(const xcb_list_fonts_reply_t *reply);

xcb_str_iterator_t xcb_list_fonts_names_iterator(const
       xcb_list_fonts_reply_t *reply);

๐ŸŒˆ REQUEST ARGUMENTS ๐ŸŒˆ

  • conn โ€” the XCB connection to X11, aka your link to the server, your main character hotline โ˜Ž๏ธ
  • max_names โ€” the maximum number of fonts to be returned. like, a cap. a limit. a "no more than this many pls" ๐Ÿ‘‘
  • pattern_len โ€” the length (in bytes) of pattern ๐Ÿ“
  • pattern โ€” a font pattern, for example "-misc-fixed-*" ๐ŸŒธ
    • the asterisk (*) is a wildcard for any number of characters ๐Ÿ’ซ
    • the question mark (?) is a wildcard for a single character ๐Ÿ™ˆ
    • use of uppercase or lowercase does not matter, so don't stress abt it bestie ๐Ÿ’…

โญ REPLY FIELDS โญ

  • response_type โ€” the type of this reply, in this case XCB_LIST_FONTS. this field is also present in the xcb_generic_reply_t and can be used to tell replies apart from each other ๐Ÿ‘€ (iykyk)
  • sequence โ€” the sequence number of the last request processed by the X11 server ๐Ÿ”ข
  • length โ€” the length of the reply, in words (a word is 4 bytes) ๐Ÿงฎ
  • names_len โ€” the number of font names ๐Ÿ“

๐Ÿ’œ DESCRIPTION ๐Ÿ’œ

gets a list of available font names which match the given pattern. that's it, that's the whole vibe โœจ


๐Ÿ”ฅ RETURN VALUE ๐Ÿ”ฅ

returns an xcb_list_fonts_cookie_t. errors have to be handled when calling the reply function xcb_list_fonts_reply ๐Ÿซก

if you want to handle errors in the event loop instead, use xcb_list_fonts_unchecked. see xcb-requests(3) for details ๐Ÿ’–


๐Ÿ’€ ERRORS ๐Ÿ’€

this request does never generate any errors. not me being shocked ๐Ÿ˜ญ iconic behaviour honestly, zero drama, no notes ๐Ÿ’…


๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘


๐Ÿงš AUTHOR ๐Ÿงš

generated from xproto.xml. contact xcb@lists.freedesktop.org for corrections and improvements ๐Ÿ’Œ


okay that's the whole page bestie, you ate ๐Ÿ’… this was xcb_list_fonts(3), brought to you by X Version 11, libxcb 1.17.0 โ€” slay, go forth and list those fonts โœจ๐ŸŽ€