A sister project to the Cairo project is the Pango project. Among other things, the documentation states...
"...The integration of Pango with Cairo (http://cairographics.org)
provides a complete solution with high quality text handling
and graphics rendering...."
I used Cairo to render my presentation on Cairo completely. But it didn't take long before I got frustrated with doing all the text drawing with the low level text APIs Cairo provides. So on a lark, I thought I'd see how hard it would be to bind at least enough of Pango to make text rendering for my slides easier. It was a gamble that paid off well. It took about 1.5 hours to do a mapping that I was able to use for everything I needed in the slides. It has been published as Pango package in the Open Repository. There's much more that could and should be wrapped. With the Cairo binding being capable of quite a bit and basically complete, I'll be moving my efforts there to round out the Pango binding.
The part mapped so far is the high level "layout" API. It shows up as a Smalltalk object called Layout (think "Text Layout"). Semantically, Pango Layout's fill the same role as Smalltalk-80's Blue Book Paragraph object (a better name for what eventually was renamed ComposedText. You create one by sending a newLayout message to a Cairo context (cr). Once you have aLayout, you use text: to set it's string. You can use an expression like alignment: Alignment center. And fontDesciptionString: to set the font and size. There's a reference in the docs that shows how flexible the fontDescrptionString can be. I haven't mapped Smalltalk Text attributes directly to Pango's text atribute structures yet, but you can use the markup: API to set the text and markup simultaneously (see this page for description of supported markup). Once you have one built, you can use pixelExtent, pixelHeight, and pixelWidth to help figure out where to put them. Use a Cairo moveTo: to position where the top-left of the layout goes. And finally a showOn: sent to the Layout with the cr as it's argument to render it.
One of the highlights of the Smalltalk Solutions conference, was that it was held in conjunction with LinuxWorld, in the town (Toronto) where the chief Pango maintainer (Behdad Esfahbod) lives. And I got to spend about 45 minutes with him. Not nearly enough. My thanks to him for spending some time with me. It was invaluable. He pointed out an example of how to do text layout along a baseline path. Got me excited about the upcoming "user font" API (a mechanism where the user can define hooks for programatically drawn font glyphs). And gave me some insight about the best parts of Pango to bind. Thanks Behdad!