[Xcb] Developer mad at libx11-xcb

Barton C Massey bart at cs.pdx.edu
Sat Feb 2 20:04:14 PST 2008


In message <20080203035759.GA66235 at kris.home> you wrote:
> On Sat, Feb 02, 2008 at 07:46:30PM -0800, Barton C Massey wrote:
> >Please help me understand the problem here; maybe we can
> >help.  What exactly are we missing?
> 
> As far as I can tell, and the people in #xcb seemed to agree, 
> there's no simple way to draw multi-byte strings in xcb. In 
> particular, Xlib has a disaster of a system that it calls font 
> sets, and the likes of X(mb|utf8)DrawString, which amalgamates 
> multiple fonts to get the characters it needs.

So a utility routine xcb_utf8_draw_string() which does the
obvious thing would make you happy?  This seems reasonable.
Fontconfig does all the hard work of building up and
subsetting the fonts needed, and I think our Xft support is
OK.  I'll talk to Keithp and think about how to get you
this.

> >As far as I know, we don't do anything clever enough with
> >property strings to mess up UTF-8.  Do you mean converting
> >between UTF-8 in your app and wacky formats in the
> >properties?
> 
> No, it's X11 that does things funny. When I use the 
> Xutf8GetTextProperty or what have you, it gives me a UTF-8 
> string, whether the property was a STRING, UTF8_STRING, TEXT, or 
> whatever else. I don't even want to think of the lengths it goes 
> to. I can probably get away with ignoring properties which 
> aren't STRINGs or UTF8_STRINGs, but I fear that I'll get bitten 
> when some Japanese or Arabic user ends up with COMPOUND_TEXT 
> (which I have no desire to handle myself).

Yeah, we've been talking about this.  Someone is talking
about building an XCB solution; it seems to me that
depending on iconv is the right way to go here, and
shouldn't be all that hard.  We definitely would like to
paper over the protocol in a utility library in such a way
that nothing above the library need ever think about a text
format other than UTF-8.


Thanks much for your prompt responses.  We'll do what we
can; we aim to please. :-)

    Bart


More information about the Xcb mailing list