[cairo] Observations from a newb

Donn donn.ingle at gmail.com
Thu Nov 8 01:32:51 PST 2007


Hi,
As a stranger to the cairo concept, and given the various posts I have skimmed 
on this list, I must say that these things have struck me as needed:

1. ctx.draw_svg(<svg object>)
Where <svg object> has been pre-fetched from a file and parsed and so forth. 
It would only include those drawing concepts that translate into cairo (so, I 
assume, no blurring and so forth).
 This make sense to me from a practical pov: it's much easier to draw 
something in Inkscape than it is to do it in code. 
 But since we are coding, it makes sense to be able to bring the svg "into" 
the code so we can do other stuff too.
 Think of the <svg object> as a source perhaps. A symbol. A group.

Oh, BTW, I mean that the SVG is drawn by cairo commands, not converted into a 
monolithic bitmap of some kind, although that could be optional.

2. I have not reached images in my experiments yet, but I think that if PNGs 
are in, then JPG and a few others should be in too. Even if they are 
internally converted to PNGs.

3. Fonts - my first few posts here and in other places led to a fantastic 
ctypes solution for loading arbitrary fonts from a file path (for which the 
credit is entirely due to others.) I really think that the ideal would be to 
have that inside cairo so that *something* like this can be done:
cairo.font_faces.append(path + "DizzyMartians.ttf") #or OTF, or Type1
myface = ctx.fetch_face("DizzyMartians")
ctx.select_font_face(myface,...,...)

I hope I don't insult anyone, I'm just observing out loud :)

\d


More information about the cairo mailing list