xcb_list_fonts_with_info(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

okay bestie, welcome to xcb_list_fonts_with_info(3), straight out of the XCB Requests corner of the universe πŸ’– this one's all about asking the X server "hey which fonts match this pattern, and also spill the tea about them" and getting a reply stuffed with char info, properties, and names. it's giving font catalog realness. let's go ✨


🌸 NAME 🌸

xcb_list_fonts_with_info β€” get matching font names and information πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <xcb/xproto.h>

πŸ’… Request function

xcb_list_fonts_with_info_cookie_t
       xcb_list_fonts_with_info(xcb_connection_t *conn,
       uint16_t max_names, uint16_t pattern_len, const char *pattern);

πŸ“ Reply datastructure

typedef struct xcb_list_fonts_with_info_reply_t {
    uint8_t        response_type;
    uint8_t        name_len;
    uint16_t       sequence;
    uint32_t       length;
    xcb_charinfo_t min_bounds;
    uint8_t        pad0[4];
    xcb_charinfo_t max_bounds;
    uint8_t        pad1[4];
    uint16_t       min_char_or_byte2;
    uint16_t       max_char_or_byte2;
    uint16_t       default_char;
    uint16_t       properties_len;
    uint8_t        draw_direction;
    uint8_t        min_byte1;
    uint8_t        max_byte1;
    uint8_t        all_chars_exist;
    int16_t        font_ascent;
    int16_t        font_descent;
    uint32_t       replies_hint;
} xcb_list_fonts_with_info_reply_t;

🌈 Reply function

xcb_list_fonts_with_info_reply_t
       *xcb_list_fonts_with_info_reply(xcb_connection_t *conn,
       xcb_list_fonts_with_info_cookie_t cookie,
       xcb_generic_error_t **e);

πŸ‘‘ Reply accessors

xcb_fontprop_t *xcb_list_fonts_with_info_properties(const
       xcb_list_fonts_with_info_request_t *reply);

int xcb_list_fonts_with_info_properties_length(const
       xcb_list_fonts_with_info_reply_t *reply);

xcb_fontprop_iterator_t
       xcb_list_fonts_with_info_properties_iterator(const
       xcb_list_fonts_with_info_reply_t *reply);

char *xcb_list_fonts_with_info_name(const
       xcb_list_fonts_with_info_request_t *reply);

int xcb_list_fonts_with_info_name_length(const
       xcb_list_fonts_with_info_reply_t *reply);

xcb_generic_iterator_t xcb_list_fonts_with_info_name_end(const
       xcb_list_fonts_with_info_reply_t *reply);
bestie i'm just gonna say it: yes, xcb_list_fonts_with_info_properties and xcb_list_fonts_with_info_name really do take a xcb_list_fonts_with_info_request_t *reply while their neighbours take the _reply_t. that's literally what the page says, i'm not editing the header for it, i'm just the messenger 🫢

πŸŽ€ REQUEST ARGUMENTS πŸŽ€

  • conn β€” your XCB connection to X11. the whole plug-in-to-the-server situation πŸ”Œ
  • max_names β€” the maximum number of fonts to be returned. like, cap it, queen.
  • pattern_len β€” the length (in bytes) of pattern. yes, bytes. we're counting.
  • pattern β€” a font pattern, for example "-misc-fixed-*".

so like, about the wildcards: the asterisk (*) is a wildcard for any number of characters, and the question mark (?) is a wildcard for a single character. and uppercase or lowercase? doesn't matter, use of uppercase or lowercase does not matter. we're case-casual in this household πŸ’…


πŸ’– REPLY FIELDS πŸ’–

  • response_type β€” the type of this reply, and in this case it's XCB_LIST_FONTS_WITH_INFO. this field also lives in the xcb_generic_reply_t, so you can use it to tell your replies apart from each other. identity check βœ…
  • 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). do not come for me, that's the unit. πŸ“
  • name_len β€” the number of matched font names.
  • min_bounds β€” minimum bounds over all existing char.
  • max_bounds β€” maximum bounds over all existing char.
  • min_char_or_byte2 β€” first character.
  • max_char_or_byte2 β€” last character.
  • default_char β€” char to print for undefined character. the understudy 🎭
  • properties_len β€” how many properties there are.
  • draw_direction β€” one of the following values:
    • XCB_FONT_DRAW_LEFT_TO_RIGHT β€” TODO: NOT YET DOCUMENTED.
    • XCB_FONT_DRAW_RIGHT_TO_LEFT β€” TODO: NOT YET DOCUMENTED.
  • min_byte1 β€” TODO: NOT YET DOCUMENTED.
  • max_byte1 β€” TODO: NOT YET DOCUMENTED.
  • all_chars_exist β€” flag if all characters have nonzero size.
  • font_ascent β€” baseline to top edge of raster.
  • font_descent β€” baseline to bottom edge of raster.
  • replies_hint β€” an indication of how many more fonts will be returned. and this is only a hint, okay?? it may be larger or smaller than the number of fonts actually returned. a zero value does not guarantee that no more fonts will be returned. so like, don't trust it with your life, it's vibes not a contract πŸ’€

✨ DESCRIPTION ✨

gets a list of available font names which match the given pattern. that's it, that's the whole mission statement, and honestly? she ate. πŸ”₯


🧚 RETURN VALUE 🧚

returns an xcb_list_fonts_with_info_cookie_t. cookies!! πŸͺ and listen: errors have to be handled when calling the reply function xcb_list_fonts_with_info_reply.

if you'd rather handle errors in the event loop instead, use xcb_list_fonts_with_info_unchecked. see xcb-requests(3) for details. iykyk.


🚨 ERRORS 🚨

this request does never generate any errors. not one. zero. iconic behaviour, no notes. πŸ‘‘


🌟 SEE ALSO 🌟


πŸ’œ AUTHOR πŸ’œ

generated from xproto.xml. contact xcb@lists.freedesktop.org for corrections and improvements. so like, if something's off, that's the inbox, bestie, not me πŸ™ˆ


and that's the whole page, you're officially a xcb_list_fonts_with_info girlie now πŸ¦‹ this was X Version 11, libxcb 1.17.0, and yes the date on the tin is just that β€” go forth, match some fonts, get some info, and remember: the hint is only a hint. periodt. πŸ’–βœ¨πŸŽ€