[Xcb] porting Xft and pango to XCB

Josh Triplett josh at freedesktop.org
Fri Oct 27 01:10:11 PDT 2006


Yang JianJun wrote:
>         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!

Wow.  Thanks for working on this!

I took a look at your Xft port, and tried to get it working on my system.  I
ran into a few issues:

* When I try to build libXft, I hit a compilation error:

 gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/freetype2 -I/tmp/xcb-util-inst/include -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -I../include/xcb/Xft -g -O2 -MT xftdpy-xcb.lo -MD -MP -MF .deps/xftdpy-xcb.Tpo -c xftdpy-xcb.c  -fPIC -DPIC -o .libs/xftdpy-xcb.o
xftdpy-xcb.c: In function '_XftDisplayInfoGet':
xftdpy-xcb.c:152: error: 'XCB_PICT_FORMAT_TYPE' undeclared (first use in this function)
xftdpy-xcb.c:152: error: (Each undeclared identifier is reported only once
xftdpy-xcb.c:152: error: for each function it appears in.)
xftdpy-xcb.c:152: error: 'XCB_PICT_FORMAT_DEPTH' undeclared (first use in this function)
xftdpy-xcb.c:153: error: 'XCB_PICT_FORMAT_RED_MASK' undeclared (first use in this function)
xftdpy-xcb.c:153: error: 'XCB_PICT_FORMAT_GREEN_MASK' undeclared (first use in this function)
xftdpy-xcb.c:154: error: 'XCB_PICT_FORMAT_BLUE_MASK' undeclared (first use in this function)
xftdpy-xcb.c:154: error: 'XCB_PICT_FORMAT_ALPHA_MASK' undeclared (first use in this function)

* I think libpixman has actually become deprecated, though I don't know the
  suggested replacement offhand.  (Possibly this got folded into cairo.)

* You didn't have the Xorg macros on your system when you autotooled libXft,
  so the XORG_RELEASE_VERSION macro didn't get expanded, and ends up in the
  configure script, which tries to execute it as a shell command.

* Going along with the previous: you checked generated files like configure
  into your subversion repository.  In general, you don't want to do that;
  people who pull straight from version control should run ./autogen.sh.


We definitely welcome ports of key libraries like Xft and Pango to XCB.  You
may want to request an account on freedesktop.org, so that you could work on
libXft there; see http://www.freedesktop.org/wiki/AccountRequests for details.
Do you have any experience with the git version control system?  libXft has a
git repository on freedesktop.org, and you could easily create a new libXft
git repository for XCB porting work, which would make it easy to merge back in
when ready.

Thanks,
Josh Triplett

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20061027/2fa7ac65/signature.pgp


More information about the Xcb mailing list