[cairo] Cairo used in mono libgdiplus CVS

Carl Worth cworth at east.isi.edu
Tue Feb 17 06:04:46 PST 2004


On Feb 16, Dave Beckett wrote:
 > I was looking to see what the Mono libgdiplus in CVS used of the cairo
 > library and found some distinctly unportable code in src/gdip.h -
 > #include <cairoint.h>
 > which won't (shouldn't) be packaged by any cairo packager.

Dave,

Thanks for investigating this. We should figure out what parts of
cairo need to be augmented to satisfy the needs of mono, so that it
can use cairo in a clean fashion.

 > /* Selects a font in Cairo without destroying it*/
 > cairo_status_t
 > cairo_select_font_nondestructive (cairo_t *cr,
 > 			cairo_font_t *font)

This one should be quite easy to eliminate. It's identical to
cairo_set_font except that cairo_set_font will also call
cairo_font_destroy on the old font. If the user wants to hold on to
the old font, the user should just call cairo_font_reference.

 > There is also use in src/graphics.c functions
 >   _utf8_to_glyphs
 >   gdip_measure_string_widths
 >   GdipDrawString
 > of fields face, face.matrix, base fields of cairo_font/ft_font.

For these, I would imagine that the current public interface of cairo,
together with the public freetype interface, should be sufficient.
But, if someone tries to do this and gets stuck, please let me know
what cairo might be missing.

Thanks,

-Carl




More information about the cairo mailing list