<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Hi,</span></div><div><span></span> </div><div><span>The problem was with cairo_font_options_t. They can't be NULL in call : cairo_scaled_font_create().</span></div><div><span>So, I added default options.</span></div><div><span></span> </div><div><span>It has moved further but still no text as on executing this line of code:</span></div><div><span>cairo_text_path(), I get </span></div><div><span></span> </div><div><span>_gcm_surface_get_font_options not implemented yet</span></div><div><span>in my debugger.</span></div><div><span>Any ideas, how to get rid of this.</span></div><div><span></span> </div><div><span>Thanks.</span></div><div><span></span></div><div><br></div>  <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new
 roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font size="2" face="Arial"> ----- Forwarded Message -----<br>  <b><span style="font-weight: bold;">From:</span></b> Techie Help <techieinfo@yahoo.co.uk><br> <b><span style="font-weight: bold;">To:</span></b> "cairo@cairographics.org" <cairo@cairographics.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Thursday, 8 November 2012, 10:51<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: Cairo and freetype<br> </font> </div> <br><meta content="off" http-equiv="x-dns-prefetch-control"><div id="yiv2112122178"><div><div style="color: rgb(0, 0, 0); font-family: times new roman, new york, times, serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><div><span>Hi Jutsin,<var id="yiv2112122178yui-ie-cursor"></var></span></div><div><span></span> </div><div><span>I did it the way you suggested:</span></div><div><span>Here's what I
 did:</span></div><div><span></span> </div><div><span></span> </div><div><span>cairo_device_t *  cairo_device=cairo_gcm_device_create(1024*1024*10, 1024*1024*15, 1024*1024*20);<br>        cairo_surface_t * surface = cairo_gcm_surface_create_for_texture(cairo_device, 1500, 1500);<br>     <br>   /* Init freetype */<br>  int error;<br>  FT_Library ft_library;<br>  error = FT_Init_FreeType(&ft_library);<br>  if (error)<br>  {<br>   printf("ERROR CODE: %d, filename: %s, line no. : %d\n", error, __FILE__,
 __LINE__);<br>  }</span></div><div><span>  //Load our fonts </span></div><div><span>  FT_Face ft_face = NULL;<br>        error = FT_New_Face(ft_library, "/app_home/FreeMonoBold.ttf", 0, &ft_face);<br>  if (error)<br>  {<br>   printf("ERROR CODE: %d, filename: %s, line no. : %d\n", error, __FILE__, __LINE__);<br>  }<br>   <br>  cairo_font_face_t *myfont_face;<br>  myfont_face =  cairo_ft_font_face_create_for_ft_face(ft_face,0);<br>  <br>  cairo_matrix_t mxSize;<br>  cairo_matrix_t mxIdent;</span></div><div><span>  cairo_matrix_init_scale(&mxSize, 16, 16); // sizing..<br>  cairo_matrix_init_identity(&mxIdent);</span></div><div><span>  cairo_scaled_font_t* cairoFont = cairo_scaled_font_create(myfont_face, &mxSize, &mxIdent,
 0);</span></div><div><span>  cairo_t *cr = cairo_create (surface);<br>  <br>  cairo_set_scaled_font(cr, cairoFont);<br>  cairo_set_font_size(cr, 16);<br>  cairo_new_path(cr);<br>  cairo_move_to(cr, 200, 200);<br>  <br>  cairo_text_path(cr, "Print Something");<br>  cairo_set_source_rgb(cr, 1, 0, 0);<br>  cairo_fill(cr);<br>  cairo_set_source_surface(cr, surface, 0, 0);<br>  cairo_paint(cr); </span></div><div><span>sys_timer_usleep(20 *1000000);</span></div><div><span></span> </div><div><span>I added sleep in the end, so that if there is any text I can see it before application exits.</span></div><div><span>But I still don't see anything.</span></div><div><span></span> </div><div><span>Sorry, I am totally new to all this. You mentioned that it will be better if I use </span></div><pre style="color: rgb(0, 0, 0);
 text-transform: none; line-height: normal; text-indent: 0px; letter-spacing: normal; font-style: normal; font-variant: normal; font-weight: normal; word-spacing: 0px; white-space: pre-wrap; orphans: 2; widows: 2;">freetype library and glyph/font rendering already available in the SDK(yes, my platform is PS3)</pre><div><span>but I am not sure how to find what is available in SDK and how to use it?</span></div><div><span></span> </div><div>Please if you can provide any more guidance it would be of great help.</div><div>Thanks<br></div>  <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font size="2" face="Arial"> <div style="margin: 5px 0px; padding: 0px; border: 1px solid rgb(204, 204, 204); height: 0px; line-height: 0; font-size: 0px;" class="yiv2112122178hr"></div>  <b><span style="font-weight:
 bold;">From:</span></b> Techie Help <techieinfo@yahoo.co.uk><br> <b><span style="font-weight: bold;">To:</span></b> "cairo@cairographics.org" <cairo@cairographics.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Wednesday, 7 November 2012, 21:28<br> <b><span style="font-weight: bold;">Subject:</span></b> Cairo and freetype<br> </font> </div> <br><div id="yiv2112122178"><div><div style="color: rgb(0, 0, 0); font-family: times new roman, new york, times, serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><div><div style='font-family: "Courier New", courier, monaco, monospace, sans-serif;'>Hi,</div><div style='font-family: "Courier New", courier, monaco, monospace, sans-serif;'><br></div><div style='font-family: "Courier New", courier, monaco, monospace, sans-serif; background-color: transparent;'>I am new to Graphics, so new to cairo as well.</div><div style='font-family: "Courier New", courier, monaco, monospace,
 sans-serif; background-color: transparent;'>I am trying to render some text using Cairo and freetype.</div><div style='font-family: "Courier New", courier, monaco, monospace, sans-serif; background-color: transparent;'>The backend that I am using is gcm, and it does not support any glyphs etc.</div><div style='font-family: "Courier New", courier, monaco, monospace, sans-serif; background-color: transparent;'>Can
 anyone please provide me with an example how to do this.</div><div style='font-family: "Courier New", courier, monaco, monospace, sans-serif; background-color: transparent;'><br></div><div style='font-family: "Courier New", courier, monaco, monospace, sans-serif; background-color: transparent;'>Thanks</div></div></div></div></div><br><br> </div> </div>  </div></div></div><meta content="on" http-equiv="x-dns-prefetch-control"><br><br> </div> </div>  </div></body></html>