<div>Hi Josh,</div>
<div>&nbsp;&nbsp;&nbsp;&nbsp; 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>&nbsp;&nbsp;&nbsp; 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>&nbsp;&nbsp;&nbsp; Please tell me if you got xft running well on xcb.</div>
<div>&nbsp;</div>
<div>--Jianjun<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 10/27/06, <b class="gmail_sendername">Josh Triplett</b> &lt;<a href="mailto:josh@freedesktop.org">josh@freedesktop.org</a>&gt; 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>&gt; On 10/27/06, Josh Triplett &lt;<a href="mailto:josh@freedesktop.org">josh@freedesktop.org
</a>&gt; wrote:<br>&gt;&gt; Yang JianJun wrote:<br>&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I have ported libXft and Pango to XCB backend, It works well<br>&gt;&gt; now.<br>&gt;&gt;&gt; For some reasons I picked Pango-1.8 which use Xft for rendering instead
<br>&gt;&gt; of<br>&gt;&gt;&gt; cairo. I removed pangox backend in pango, just use pangoxft which build<br>&gt;&gt;&gt; directly on the lates XCB.<br>&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; The default backend of libXft is X11 ,the configure option is
<br>&gt;&gt;&gt; &quot;--enable-xcb&quot; if you want to use the XCB backend.The same as xft, pango<br>&gt;&gt;&gt; also use &quot;--enable-xcb&quot; to enable pangoxft to build on XCB. In addition,<br>&gt;&gt;&gt; some Xlib functions in Xft have not ported yet,includes XGetDefault and
<br>&gt;&gt;&gt; XRenderQuerySubpixelOrder. I just hard-code the default values.<br>&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; All my work is available from<br>&gt;&gt;&gt; <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>&gt;&gt; me<br>&gt;&gt;&gt; know if you have more questions.<br>&gt;&gt;&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Any suggestion is welcome, thanks!<br>&gt;&gt; Wow.&nbsp;&nbsp;Thanks for working on this!<br>&gt;&gt;<br>&gt;&gt; I took a look at your Xft port, and tried to get it working on my
<br>&gt;&gt; system.&nbsp;&nbsp;I<br>&gt;&gt; ran into a few issues:<br>&gt;&gt;<br>&gt;&gt; * When I try to build libXft, I hit a compilation error:<br>&gt;&gt;<br>&gt;&gt; gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/freetype2
<br>&gt;&gt; -I/tmp/xcb-util-inst/include -Wall -Wpointer-arith -Wstrict-prototypes<br>&gt;&gt; -Wmissing-prototypes -Wmissing-declarations -Wnested-externs<br>&gt;&gt; -fno-strict-aliasing -I../include/xcb/Xft -g -O2 -MT 
xftdpy-xcb.lo -MD -MP<br>&gt;&gt; -MF .deps/xftdpy-xcb.Tpo -c xftdpy-xcb.c&nbsp;&nbsp;-fPIC -DPIC -o .libs/xftdpy-<br>&gt;&gt; xcb.o<br>&gt;&gt; xftdpy-xcb.c: In function '_XftDisplayInfoGet':<br>&gt;&gt; xftdpy-xcb.c:152: error: 'XCB_PICT_FORMAT_TYPE' undeclared (first use in
<br>&gt;&gt; this function)<br>&gt;&gt; xftdpy-xcb.c:152: error: (Each undeclared identifier is reported only once<br>&gt;&gt; xftdpy-xcb.c:152: error: for each function it appears in.)<br>&gt;&gt; xftdpy-xcb.c:152: error: 'XCB_PICT_FORMAT_DEPTH' undeclared (first use in
<br>&gt;&gt; this function)<br>&gt;&gt; xftdpy-xcb.c:153: error: 'XCB_PICT_FORMAT_RED_MASK' undeclared (first use<br>&gt;&gt; in this function)<br>&gt;&gt; xftdpy-xcb.c:153: error: 'XCB_PICT_FORMAT_GREEN_MASK' undeclared (first
<br>&gt;&gt; use in this function)<br>&gt;&gt; xftdpy-xcb.c:154: error: 'XCB_PICT_FORMAT_BLUE_MASK' undeclared (first use<br>&gt;&gt; in this function)<br>&gt;&gt; xftdpy-xcb.c:154: error: 'XCB_PICT_FORMAT_ALPHA_MASK' undeclared (first
<br>&gt;&gt; use in this function)<br>&gt;&gt;<br>&gt;&gt; * I think libpixman has actually become deprecated, though I don't know<br>&gt;&gt; the<br>&gt;&gt;&nbsp;&nbsp; suggested replacement offhand.&nbsp;&nbsp;(Possibly this got folded into cairo.)
<br>&gt;<br>&gt;<br>&gt; No,these errors have nothing to do with libpixman, just because your<br>&gt; xcb-util library is a little old. xcb-util has update for &quot;Rename<br>&gt; enumerations to coding standard&quot;, you should get the latest xcb-util.
<br>&gt; 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.&nbsp;&nbsp;I updated to a<br>current checkout, and your libXft now builds with --enable-xcb.&nbsp;&nbsp;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>&nbsp;&nbsp; if (info-&gt;hasRender)<br>&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int major, minor;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ver_rep = xcb_render_query_version_reply (dpy,xcb_render_query_version (dpy,major, minor),NULL);
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; major = ver_rep-&gt;major_version;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; minor = ver_rep-&gt;minor_version;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (major &lt; 0 || (major == 0 &amp;&amp; minor &lt;= 2))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; info-&gt;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>