[cairo] Observations from a newb
Gerdus van Zyl
gerdusvanzyl at gmail.com
Thu Nov 8 02:00:43 PST 2007
You must remember that cairo follows the simple is beautiful and no
duplication philosophy. It does not duplicate when other free
libraries can do the same and better.
1. ctx.draw_svg(<svg object>)
- librsvg is very good,has a liberal license and draws using cairo so
there is no need to duplicate.
- My wishlist however is to have librsvg output to cairo commands or
capture the commands somehow, so i can compile in svg art without the
librsvg dependency.
2. Other image file formats - GIF,JPG
- cairo is mostly a drawing/rendering library and as such file formats
is not really part of the statement of intent
- cairo does provide a get image data api so you can eg: use PIL in
python to save/load to any format you desire.
3. cairo is not a font library
- pango is awesome just wish it was a little faster on latin text :-)
- I sympathize with people who are trying to use custom fonts with
cairo since it can be a pain and not always accessible from python.
I don't know if there would be interest in two versions of cairo?
cairo-core = same as now
cairo-framework = cairo+pango+librsvg+canvas/scenegraph (in one virtual library)
Since most people expect cairo-framework but get cairo-core plus build
your own framework.
~Gerdus van Zyl
On Nov 8, 2007 11:32 AM, Donn <donn.ingle at gmail.com> wrote:
> 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
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://lists.cairographics.org/mailman/listinfo/cairo
>
More information about the cairo
mailing list