The core xcb_render_composite_glyph_8/16/32 requests are too primitive, taking only a byte array whose length is difficult to determine. We should add xcb_renderutil_composite_string/glyph_8/16/32 functions to the renderutil libary to make this more convenient. These will be direct ports or the libXrender XRenderComposite* series of functions found in libXrender/src/Glyph.c.
I've added a prototype API to util/renderutil, to be used as follows: const uint8_t glyphs[] = (const uint8_t *)"Hello, world!"; size_t len = strlen("Hello, world!"); xcb_render_util_composite_text_stream_t *s; s = xcb_render_util_composite_text_stream( glyphset, len, 0); xcb_render_util_glyphs_8( s, dx, dy, len, glyphs); xcb_render_util_composite_text( c, op, src, dst, mask_format, src_x, src_y, s); xcb_render_util_composite_text_free( s); Please review. Next step is testing, by either: 1) using it in demo/rendercheck (requiring font support and a glyph cache to be added) 2) implementing the font rendering backend to cairo
Seems to work well enough. Cairo and Xft have been modified to use the new interface successfully.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.