status = _cairo_cache_lookup (im_cache, key, (void **) (&im));
status = _cairo_cache_lookup (im_cache, key, (void **) (&im), NULL);
_xlib_glyphset_cache_create_entry (void *cache,				   void *key,				   void **return_entry){    glyphset_cache_t *g = (glyphset_cache_t *) cache;    cairo_glyph_cache_key_t *k = (cairo_glyph_cache_key_t *)key;    glyphset_cache_entry_t *v;    cairo_status_t status;    cairo_cache_t *im_cache;    cairo_image_glyph_cache_entry_t *im;    v = malloc (sizeof (glyphset_cache_entry_t));    _cairo_lock_global_image_glyph_cache ();    im_cache = _cairo_get_global_image_glyph_cache ();    if (g == NULL || v == NULL ||g == NULL || im_cache == NULL) {	_cairo_unlock_global_image_glyph_cache ();	return CAIRO_STATUS_NO_MEMORY;    }    status = _cairo_cache_lookup (im_cache, key, (void **) (&im));    if (status != CAIRO_STATUS_SUCCESS || im == NULL) {	_cairo_unlock_global_image_glyph_cache ();	return CAIRO_STATUS_NO_MEMORY;    }    v->key = *k;    _cairo_unscaled_font_reference (v->key.unscaled);    v->glyph = _next_xlib_glyph (g);    v->info.width = im->image ? im->image->stride : im->size.width;    v->info.height = im->size.height;    /*     *  Most of the font rendering system thinks of glyph tiles as having     *  an origin at (0,0) and an x and y bounding box "offset" which     *  extends possibly off into negative coordinates, like so:     *     *          *       (x,y) <-- probably negative numbers     *         +----------------+     *         |      .         |     *         |      .         |     *         |......(0,0)     |     *         |                |     *         |                |     *         +----------------+     *                  (width+x,height+y)     *     *  This is a postscript-y model, where each glyph has its own     *  coordinate space, so it's what we expose in terms of metrics. It's     *  apparantly what everyone's expecting. Everyone except the Render     *  extension. Render wants to see a glyph tile starting at (0,0), with     *  an origin offset inside, like this:     *     *       (0,0)     *         +---------------+     *         |      .        |     *         |      .        |     *         |......(x,y)    |     *         |               |     *         |               |     *         +---------------+     *                   (width,height)     *     *  Luckily, this is just the negation of the numbers we already have     *  sitting around for x and y.      */    v->info.x = -im->size.x;    v->info.y = -im->size.y;    v->info.xOff = 0;    v->info.yOff = 0;    XRenderAddGlyphs (g->display, g->glyphset,		      &(v->glyph), &(v->info), 1,		      im->image ? im->image->data : NULL,		      im->image ? v->info.height * v->info.width : 0);    v->key.base.memory = im->image ? im->image->width * im->image->stride : 0;    *return_entry = v;    _cairo_unlock_global_image_glyph_cache ();    return CAIRO_STATUS_SUCCESS;}