<div>Hi Josh,</div>
<div> I have updated xftdpy-xcb.c for initializing the client version number(set major=0,minor=3) when query render verion, according to the one in xcb-demo/rendertest.c.<br> If you still run into segfaults or hangs, maybe some default-values are wrong,which originally got by XGetDefault. I just hard-code them,you can modify them to fit yourself then try again.
<br> Please tell me if you got xft running well on xcb.</div>
<div> </div>
<div>--Jianjun<br><br> </div>
<div><span class="gmail_quote">On 10/27/06, <b class="gmail_sendername">Josh Triplett</b> <<a href="mailto:josh@freedesktop.org">josh@freedesktop.org</a>> wrote:</span></div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Yang JianJun wrote:<br>> On 10/27/06, Josh Triplett <<a href="mailto:josh@freedesktop.org">josh@freedesktop.org
</a>> wrote:<br>>> Yang JianJun wrote:<br>>>> I have ported libXft and Pango to XCB backend, It works well<br>>> now.<br>>>> For some reasons I picked Pango-1.8 which use Xft for rendering instead
<br>>> of<br>>>> cairo. I removed pangox backend in pango, just use pangoxft which build<br>>>> directly on the lates XCB.<br>>>> The default backend of libXft is X11 ,the configure option is
<br>>>> "--enable-xcb" if you want to use the XCB backend.The same as xft, pango<br>>>> also use "--enable-xcb" to enable pangoxft to build on XCB. In addition,<br>>>> some Xlib functions in Xft have not ported yet,includes XGetDefault and
<br>>>> XRenderQuerySubpixelOrder. I just hard-code the default values.<br>>>> All my work is available from<br>>>> <a href="http://svn.sourceforge.net/viewvc/gtk-xcb/">http://svn.sourceforge.net/viewvc/gtk-xcb/
</a>. Have a look at that and let<br>>> me<br>>>> know if you have more questions.<br>>>> Any suggestion is welcome, thanks!<br>>> Wow. Thanks for working on this!<br>>><br>>> I took a look at your Xft port, and tried to get it working on my
<br>>> system. I<br>>> ran into a few issues:<br>>><br>>> * When I try to build libXft, I hit a compilation error:<br>>><br>>> gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/freetype2
<br>>> -I/tmp/xcb-util-inst/include -Wall -Wpointer-arith -Wstrict-prototypes<br>>> -Wmissing-prototypes -Wmissing-declarations -Wnested-externs<br>>> -fno-strict-aliasing -I../include/xcb/Xft -g -O2 -MT
xftdpy-xcb.lo -MD -MP<br>>> -MF .deps/xftdpy-xcb.Tpo -c xftdpy-xcb.c -fPIC -DPIC -o .libs/xftdpy-<br>>> xcb.o<br>>> xftdpy-xcb.c: In function '_XftDisplayInfoGet':<br>>> xftdpy-xcb.c:152: error: 'XCB_PICT_FORMAT_TYPE' undeclared (first use in
<br>>> this function)<br>>> xftdpy-xcb.c:152: error: (Each undeclared identifier is reported only once<br>>> xftdpy-xcb.c:152: error: for each function it appears in.)<br>>> xftdpy-xcb.c:152: error: 'XCB_PICT_FORMAT_DEPTH' undeclared (first use in
<br>>> this function)<br>>> xftdpy-xcb.c:153: error: 'XCB_PICT_FORMAT_RED_MASK' undeclared (first use<br>>> in this function)<br>>> xftdpy-xcb.c:153: error: 'XCB_PICT_FORMAT_GREEN_MASK' undeclared (first
<br>>> use in this function)<br>>> xftdpy-xcb.c:154: error: 'XCB_PICT_FORMAT_BLUE_MASK' undeclared (first use<br>>> in this function)<br>>> xftdpy-xcb.c:154: error: 'XCB_PICT_FORMAT_ALPHA_MASK' undeclared (first
<br>>> use in this function)<br>>><br>>> * I think libpixman has actually become deprecated, though I don't know<br>>> the<br>>> suggested replacement offhand. (Possibly this got folded into cairo.)
<br>><br>><br>> No,these errors have nothing to do with libpixman, just because your<br>> xcb-util library is a little old. xcb-util has update for "Rename<br>> enumerations to coding standard", you should get the latest xcb-util.
<br>> XCB_PICT_FORMAT_* now defines in xcb_renderutil.h. Can you run it then?<br><br>I did indeed have an older xcb-util checkout; good catch. I updated to a<br>current checkout, and your libXft now builds with --enable-xcb. However,
<br>when I attempt to run programs against it, it either segfaults or hangs.<br><br>I noticed a few warnings while building; looking into them, some relate to<br>variables initialized by the commented-out calls to XGetDefault, but I also
<br>noticed this one, in _XftDisplayInfoGet from line 141 of xftdpy-xcb.c onward:<br><br> if (info->hasRender)<br> {<br> int major, minor;<br><br> ver_rep = xcb_render_query_version_reply (dpy,xcb_render_query_version (dpy,major, minor),NULL);
<br> major = ver_rep->major_version;<br> minor = ver_rep->minor_version;<br><br> if (major < 0 || (major == 0 && minor <= 2))<br> info->use_free_glyphs = FcFalse;
<br><br>This code passes the uninitialized local variables major and minor to<br>xcb_render_query_version as the client-supported major and minor Render<br>version, before using them to hold the negotiated version.<br><br>
Also, the point about libpixman deprecation didn't relate to the error<br>messages.<br><br>- Josh Triplett<br><br><br><br></blockquote><br>