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

Arnaud Fontaine arnaud at andesi.org
Wed Mar 10 19:17:50 PST 2010


Hi,

    > 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.

Welcome ! ;)

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

It may not really help as  it does not directly answer to your question,
but maybe  you could use Pango[0]  (as used in GTK+  notably) instead of
core X11  fonts?  Indeed, the  former provides many advantages  over the
latter (anti-aliasing,  client-side[1], internationalization...)  and is
clearly the way  to go nowadays.  You  can have a look at  [2] for basic
further information about that (Pango actually sits on top of Xft).

If you decide to do so, then  you can use cairo-xcb for rendering as Xft
library has  not been  ported (yet?) to  XCB. If  you want to  have some
examples of  code, you can  have a look  at Awesome window  manager code
which use pango/cairo-xcb[3] (font.{c,h} and draw_text in draw.c).

Hope that helps.

Arnaud

[0] http://www.pango.org/
[1] http://keithp.com/~keithp/talks/xtc2001/xft.ps
[2] http://en.wikibooks.org/wiki/Guide_to_X11/Fonts#Core_versus_Xft_fonts
[3] http://git.naquadah.org/?p=awesome.git;a=tree


More information about the Xcb mailing list