xcb_list_fonts_with_info(3)
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_propertiesandxcb_list_fonts_with_info_namereally do take axcb_list_fonts_with_info_request_t *replywhile 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) ofpattern. 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'sXCB_LIST_FONTS_WITH_INFO. this field also lives in thexcb_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. πβ¨π
π¦ where this page comes from
- alpine 3.22: libxcb-doc 1.17.0-r0 Β· MIT
- alpine 3.23: libxcb-doc 1.17.0-r1 Β· MIT
- alpine 3.24: libxcb-doc 1.17.0-r2 Β· MIT
- arch rolling: libxcb 1.17.0-1 Β· X11
- centos-stream 10: libxcb-devel 1.17.0-3.el10 Β· X11
- debian trixie: libxcb-doc 1.17.0-2
- fedora 43: libxcb-devel 1.17.0-6.fc43 Β· X11
- fedora 43: libxcb-devel 1.17.0-6.fc43 Β· X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 Β· X11
- fedora 44: libxcb-devel 1.17.0-7.fc44 Β· X11
- nixpkgs unstable: libxcb 1.17.0
- opensuse-leap 16.0: libxcb-devel-doc 1.17.0-160000.2.2 Β· MIT
- ubuntu questing: libxcb-doc 1.17.0-2build1
- ubuntu resolute: libxcb-doc 1.17.0-2ubuntu1
- ubuntu stonking: libxcb-doc 1.17.0-2ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms