On Mon, Jun 23, 2008 at 11:01 PM, bulia byak wrote:
On Mon, Jun 23, 2008 at 3:40 PM, Maximilian Albert 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.
I'm sorry for raising this issue once again for a millionth time, but now that Inkscape uses Cairo is it possible to make text antialising happen? I know this isn't any good for printing, but us, display people, really need nice antialiased letters. See, ehenever I do something in Inkscape that involves text at small font size I'm bound to switch to GIMP and add the text above exported PNG just because the text looks ugly. This really is a must for screen graphics and web design.
Alexandre