xcb_query_font(3)
π xcb_query_font(3) π
okay so bestie, welcome to xcb_query_font(3) β part of the XCB Requests crew, living in libxcb. this is the one where you ask the X server "hey queen, what are the metrics on this font?" and she tells you everything. pull up a chair π«Ά
β¨ NAME β¨
xcb_query_font β query font metrics π
πΈ SYNOPSIS πΈ
#include <xcb/xproto.h>
π Request function
xcb_query_font_cookie_t xcb_query_font(xcb_connection_t *conn,
xcb_fontable_t font);
π Reply datastructure
typedef struct xcb_query_font_reply_t {
uint8_t response_type;
uint8_t pad0;
uint16_t sequence;
uint32_t length;
xcb_charinfo_t min_bounds;
uint8_t pad1[4];
xcb_charinfo_t max_bounds;
uint8_t pad2[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 char_infos_len;
} xcb_query_font_reply_t;
π Reply function
xcb_query_font_reply_t *xcb_query_font_reply(xcb_connection_t *conn,
xcb_query_font_cookie_t cookie, xcb_generic_error_t **e);
π Reply accessors
xcb_fontprop_t *xcb_query_font_properties(const xcb_query_font_request_t
*reply);
int xcb_query_font_properties_length(const xcb_query_font_reply_t
*reply);
xcb_fontprop_iterator_t xcb_query_font_properties_iterator(const
xcb_query_font_reply_t *reply);
xcb_charinfo_t *xcb_query_font_char_infos(const xcb_query_font_request_t
*reply);
int xcb_query_font_char_infos_length(const xcb_query_font_reply_t
*reply);
xcb_charinfo_iterator_t xcb_query_font_char_infos_iterator(const
xcb_query_font_reply_t *reply);
π¦ REQUEST ARGUMENTS π¦
connβ the XCB connection to X11, obvs. your lil hotline to the server πfontβ the fontable (that's a Font or a Graphics Context) you wanna query. yes bestie, either one works π
π REPLY FIELDS π
response_typeβ the type of this reply, which in this case isXCB_QUERY_FONT. this field also lives in thexcb_generic_reply_t, so you can use it to tell your replies apart from each other. very main character of it β¨sequenceβ the sequence number of the last request the X11 server processed.lengthβ how long the reply is, in words. and no, not vibes-words β a word is 4 bytes π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β the char to print for an undefined character.properties_lenβ how many properties there are.draw_directionβ one of the following values, bestie: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.char_infos_lenβ TODO: NOT YET DOCUMENTED. π
π DESCRIPTION π
Queries information associated with the font. that's it, that's the whole thing. she's simple, she's iconic, she gets the job done π
β RETURN VALUE β
Returns an xcb_query_font_cookie_t. Errors have to be handled when calling the reply function xcb_query_font_reply.
If you'd rather handle errors in the event loop instead, use xcb_query_font_unchecked. See xcb-requests(3) for details, bestie.
π ERRORS π
This request does never generate any errors. no drama, no chaos, she's chill π§
π SEE ALSO π
π AUTHOR π
Generated from xproto.xml. Contact xcb@lists.freedesktop.org for corrections and improvements.
okay that's the whole page, you ate it, you understood it, periodt π
β¨ this was X Version 11, libxcb 1.17.0, and yeah the whole thing is xcb_query_font(3) β go query some fonts bestie, ily π«ΆππΈ
π¦ 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