if (_cairo_cache_lookup (cache, &key, (void **) &img)
if (_cairo_cache_lookup (cache, &key, (void **) &img, NULL)
_cairo_ft_font_glyph_extents (void			*abstract_font,			      cairo_font_scale_t 	*sc,                              cairo_glyph_t		*glyphs,                               int			num_glyphs,			      cairo_text_extents_t	*extents){    int i;    cairo_ft_font_t *font = abstract_font;    cairo_point_double_t origin;    cairo_point_double_t glyph_min, glyph_max;    cairo_point_double_t total_min, total_max;    cairo_image_glyph_cache_entry_t *img = NULL;    cairo_cache_t *cache;    cairo_glyph_cache_key_t key;    if (num_glyphs == 0)    {	extents->x_bearing = 0.0;	extents->y_bearing = 0.0;	extents->width  = 0.0;	extents->height = 0.0;	extents->x_advance = 0.0;	extents->y_advance = 0.0;	return CAIRO_STATUS_SUCCESS;    }    origin.x = glyphs[0].x;    origin.y = glyphs[0].y;    _cairo_lock_global_image_glyph_cache ();    cache = _cairo_get_global_image_glyph_cache ();    if (cache == NULL) {	_cairo_unlock_global_image_glyph_cache ();	return CAIRO_STATUS_NO_MEMORY;    }        key.unscaled = &font->base;    key.scale = *sc;    for (i = 0; i < num_glyphs; i++)    {	img = NULL;	key.index = glyphs[i].index;	if (_cairo_cache_lookup (cache, &key, (void **) &img) 	    != CAIRO_STATUS_SUCCESS || img == NULL)	    continue;		/* XXX: Need to add code here to check the font's FcPattern           for FC_VERTICAL_LAYOUT and if set get vertBearingX/Y           instead. This will require that           cairo_ft_font_create_for_ft_face accept an           FcPattern. */	glyph_min.x = glyphs[i].x + img->extents.x_bearing;	glyph_min.y = glyphs[i].y + img->extents.y_bearing;	glyph_max.x = glyph_min.x + img->extents.width;	glyph_max.y = glyph_min.y + img->extents.height;    	if (i==0) {	    total_min = glyph_min;	    total_max = glyph_max;	} else {	    if (glyph_min.x < total_min.x)		total_min.x = glyph_min.x;	    if (glyph_min.y < total_min.y)		total_min.y = glyph_min.y;	    if (glyph_max.x > total_max.x)		total_max.x = glyph_max.x;	    if (glyph_max.y > total_max.y)		total_max.y = glyph_max.y;	}    }    _cairo_unlock_global_image_glyph_cache ();    extents->x_bearing = (total_min.x - origin.x);    extents->y_bearing = (total_min.y - origin.y);    extents->width     = (total_max.x - total_min.x);    extents->height    = (total_max.y - total_min.y);    extents->x_advance = glyphs[i-1].x + (img == NULL ? 0 : img->extents.x_advance) - origin.x;    extents->y_advance = glyphs[i-1].y + (img == NULL ? 0 : img->extents.y_advance) - origin.y;    return CAIRO_STATUS_SUCCESS;}