[Xcb] drawing a font

Vincent Torri Vincent.Torri at iecn.u-nancy.fr
Wed Dec 8 15:46:19 PST 2004


>
> Frankly, I'd use Cairo's toy font API for this. Core X drawing is a bit
> of a pain, and Cairo is really nice.

i'll look at it, but to know how i could find something similar to XImage.

>
> But Jeremy may well be right. If drawing a dot works in this code, it's
> only because there was some chance it'd work no matter what you did. To
> be certain, you really should wait for the expose event. (That's true in
> Xlib too.)
>
> I might believe your argument a little more if you did the XCBSync
> *before* drawing anything, but not even that would really convince me.
>
> Even if Jeremy and I are wrong, the answer to your question will
> probably be in an X error, so you'll want an event loop that tells you
> about any errors you receive.
>
> You also want an event loop because you're configuring your window to
> send you a bunch of different events, and then ignoring them, which is
> much like a memory leak.
>
> I hope something in there is helpful.

i've tried to draw during the expose event (xcbpolytext8 then xcbcopyarea
then xcbsync).

nobody has tried to fix this simple program ? Where could be the error ?
in the gc ?
I query the font and put the result in fontrep, but i don't use it after
(i try to do like i would do in Xlib, and one queries the font, so...)
Maybe it's that (i don't know the internal of xcb).

Jamey, if you're interested in the tutorial, i could give you a improved
version of it.

regards

Vincent TORRI


More information about the xcb mailing list