[Xcb] Question about xcb_list_fonts_with_info

Josh Triplett josh at joshtriplett.org
Sun Dec 29 16:35:02 PST 2013


On Sun, Dec 29, 2013 at 09:10:06PM +0100, Jochen Keil wrote:
> I have a question regarding the `xcb_list_fonts_with_info` request function.
> 
> The Xlib function `XListFontsWithInfo` returns an char ** array which I
> can walk through by taking `count_return` into consideration.
> When I try it out with e.g. maxnames = 8 and pattern = "*" I get a list
> with 8 null-terminated (\0) strings of fonts available on my system,
> starting with the very first.
> 
> How would I do that using the `xcb_list_fonts_with_info` function?
> I can get the very first match with `xcb_list_fonts_with_info_name` and
> `xcb_list_fonts_with_info_name_length`, but how would I go about for the
> rest?

The X11 ListFontsWithInfo request produces multiple replies, one per
font.  You need to keep retrieving replies until the server doesn't
return any more; each reply describes only one font.

- Josh Triplett


More information about the Xcb mailing list