
On Mon, Jun 23, 2008 at 3:40 PM, Maximilian Albert <Anhalter42@...173...> wrote:
Since you don't need to worry about exact font, kerning, etc., which all may be tricky, cairo is the natural choice for this. Each canvas item has a render method which is passed the SPCanvasBuf; you can just deconstruct it to access the actual memory buffer, create a temporary cairo surface and context in the render method of your text canvas item, and draw text to it using cairo's show_text.
Is there boilerplate code available somewhere for creating and managing such a context? In particular, how would I tie it into SPCanvasBuf?
Please hold on - since my writing to you I have actually started working on that, and hope to be able to commit the result today or tomorrow. Then it will be easy to use cairo to render canvas items. Canvas bpaths are already cairoified in my local tree.