Converting Cairo ImageSurface into a Texture2D

Is it possible to convert a Cairo ImageSurface into a Texture2D?

I am exploring this in order to create textures with test dinamically, so I got this code from an example:

ImageSurface surface = new ImageSurface(Format.ARGB32, 31, 41);
Context cr = new Context(surface);
cr.SelectFontFace(“Georgia”, FontSlant.Normal, FontWeight.Bold);
cr.SetFontSize(1.2);
TextExtents te = cr.TextExtents(“a”);
cr.MoveTo(0.5 - te.Width / 2 - te.XBearing, 0.5 - te.Height / 2 - te.YBearing);
cr.ShowText(“a”);

But get stuck there, since I do not know now how to convert surface into a Texture2d or something usable within Unity.

It seems like ImageSurface has a WriteToPng method, but writing to a file for reading it again could be suboptimal. I think there should be an straightway that I do not know.

Thanks a lot in advance,

Not sure what a Cairo imageSurface is but with the Unity Pro feature RenderTexture it should be possible: http://docs.unity3d.com/Documentation/ScriptReference/RenderTexture.html. Inside the asset store there is an example inside this package: http://u3d.as/content/allegorithmic/substance-terrain-tool/2pv. It maps a texture on a plane and renders a new image from the camera projection.

Peter.