[cairo] FT fonts and Aqua ?

Charles سمير Doutriaux doutriaux1 at llnl.gov
Tue Mar 31 11:08:45 PDT 2009


I'm trying to use cairo to draw on an aqua surface.

I'm successfull getting it to draw and update rectangles/lines, etc...

But I'm having an issue when it comes to text

I can get it to write on my surface, if i use the default font, but  
when creating a FT face for cairo it fails with "out_of_memory" when  
trying to use it for drawing,

here's a snippet of the code I use, any idea? IS it at all possible to  
use FT on Aqua surfaces?




   context = static_cast<CGContextRef > (this->macCGHandle());
     CAIRO_SURFACE =    
     cr = cairo_create(CAIRO_SURFACE);
   printf("we are drawing: %s\n",msg);
   index = FT_New_Face( ft_library, path, 0, &myftface );
   if ( index )
       printf("londfont no file bug\n");
   mycairoftface = (cairo_font_face_t  
   printf("cairo status b4 ftface: %s 

   cairo_set_font_face (cr, mycairoftface);
   printf("cairo status after ftface: %s 
   cairo_set_font_size(cr, 100.);
   printf("cairo status after size: %s 

   printf("cairo status after msg ftface: %s 

The satus meesages are as follow:
cairo status b4 ftface: success
cairo status after ftface: success
cairo status after size: success
cairo status after msg ftface: out of memory

More information about the cairo mailing list