[Xcb] porting Xft and pango to XCB

Ian Osgood iano at quirkster.com
Fri Oct 27 12:37:45 PDT 2006

---------- Original Message ----------------------------------
From: "Yang JianJun" <supermaper at gmail.com>
Date:  Fri, 27 Oct 2006 14:50:57 +0800

>        I have ported libXft and Pango to XCB backend, It works well now.
>For some reasons I picked Pango-1.8 which use Xft for rendering instead of
>cairo. I removed pangox backend in pango, just use pangoxft which build
>directly on the lates XCB.
>        The default backend of libXft is X11 ,the configure option is
>"--enable-xcb" if you want to use the XCB backend.The same as xft, pango
>also use "--enable-xcb" to enable pangoxft to build on XCB. In addition,
>some Xlib functions in Xft have not ported yet,includes XGetDefault and
>XRenderQuerySubpixelOrder. I just hard-code the default values.
>        All my work is available from
>http://svn.sourceforge.net/viewvc/gtk-xcb/. Have a look at that and let me
>know if you have more questions.
>        Any suggestion is welcome, thanks!

Excellent work! I'm glad you could put my composite_text functions to use.

XGetDefault requires using the XResource extension and perhaps putting a utility 
library on top of it, something like Xlib's resource manager. I'm not sure how much 
work we should put into this. Aren't XResource style settings being replaced with 
better mechanisms?

QuerySubPixelOrder is just an accessor to the QueryPictFormats reply. See:


The subpixels iterator is indexed by screen number. (Note, this requires Render 
version 6 or later; you seem to be checking for version 3.)

Could you indicate which source files in Xft you had to modify (if any) for XCB? 
Alternatively, rebuild your SVN repository so the history starts with your starting 
version of Xft.

I also encourage you to register with Freedesktop so you can integrate your work 
into the main libXft repository on freedesktop.org.  Next steps would be to figure 
out how to avoid duplicating the code of every source file in Xft, since duplicated 
code leads to maintenance headaches. It should also be possible to merge all the 
xft_render_composite_textN functions into XftGlyphSpecRender to avoid code 

Also, the XCB functions should have different names than the X functions, since 
they are using different parameter types (connections vs. Display, for example). 
Perhaps follow the new XCB conventions: xcb_ft_glyph_spec_render, for example.


More information about the Xcb mailing list