[Xcb] Carbon, the new xcb based terminal emulator.

Simon Gomizelj simongmzlj at gmail.com
Wed Mar 10 17:16:17 PST 2010

Hello, new guy here. My name is Simon Gomizelj and I recently took it upon
myself to try to write a terminal emulator build on xcb. I need some help.

I've got much of the plumbing done on the terminal side of things, but I'm
having issues with the xcb side of things. Right now I'm trying to print a
series of lines of text with xcb as a test. However I can't seem to get a
correct character height querying the font. The following code is returning
these values:

gc = getfontgc(w, "-*-terminus-medium-r-normal-*-12-*-*-*-*-*-*-*");

fontcookie = xcb_query_font(w->conn, gc);
fontreply = xcb_query_font_reply(w->conn, fontcookie, NULL);
info = xcb_query_font_char_infos(fontreply);

info->ascent is 8, should be 10
info->descent is 0, should be 2

The comparable Xlib code is from the suckless terminal and is as follows

#define FONT "-*-terminus-medium-r-normal-*-12-*-*-*-*-*-*-*"
dc.font = XLoadQueryFont(xw.dis, FONT);

I apologize for any mis-formatting, this is my first mailing list post ever.
And for those interested, the project is hosted here:
http://github.com/simongmzlj/carbon. It currently doesn't build or do
anything useful :).

Much thanks for your time.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20100310/bf429c2b/attachment.html>

More information about the Xcb mailing list