<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div>My application should check if a font exists and if it does not try the next font preference obtained from the user, a bit like processing a font-choice list in CSS.<br><br>Cairo:<br>const char * str = "nosuchfont";<br>cairo_font_face_t * ff =<br> cairo_toy_font_face_create ( str ,<br>                              CAIRO_FONT_SLANT_NORMAL ,<br>                              CAIRO_FONT_WEIGHT_NORMAL ) ;<br>const char * toyfamilyis = cairo_toy_font_face_get_family ( ff );<br><br>The toyfamilyis was returned as 'nosuchfont'. The manual
 mentions that toy_font_face_create and the cairo_font_select_face do not report back whether the font exists or not. A pity. If it returned NULL for a non-existent choice then my program could loop through the user preferences.<br><br>I also tried pango:<br>PangoFontDescription * pfd = pango_font_description_from_string ( str );<br>const char * familyis = pango_font_description_get_family(pfd);<br><br>This time familyis was also returned as 'nosuchfont'.<br><br>I have read somewhere that pango can tell if a font exists.<br><br>How can I make it return this information?<br><br>Ken<br></div></div></body></html>