Work around cairo limitations

If we just draw an image, cairos recording surface
complains that it is unbounded. Its not true of course.

To make things work, clip to the extents.
diff --git a/src/hb-ot-color-cbdt-table.hh b/src/hb-ot-color-cbdt-table.hh
index a6b9064..c326770 100644
--- a/src/hb-ot-color-cbdt-table.hh
+++ b/src/hb-ot-color-cbdt-table.hh
@@ -956,6 +956,11 @@
       if (unlikely (!get_extents (font, glyph, &pixel_extents, false)))
         return false;
 
+      funcs->push_clip_rectangle (data,
+                                  extents.x_bearing, extents.y_bearing,
+                                  extents.x_bearing + extents.width,
+                                  extents.y_bearing + extents.height);
+
       funcs->image (data,
 		    blob,
 		    pixel_extents.width, -pixel_extents.height,
@@ -963,6 +968,8 @@
 		    font->slant_xy,
 		    &extents);
 
+      funcs->pop_clip (data);
+
       hb_blob_destroy (blob);
       return true;
     }
diff --git a/util/hb-cairo-utils.c b/util/hb-cairo-utils.c
index 3613e09..27dda47 100644
--- a/util/hb-cairo-utils.c
+++ b/util/hb-cairo-utils.c
@@ -180,6 +180,15 @@
   if (!surface)
     return;
 
+  cairo_save (cr);
+  /* this clip is here to work around recording surface limitations */
+  cairo_rectangle (cr,
+                   extents->x_bearing,
+                   extents->y_bearing,
+                   extents->width,
+                   extents->height);
+  cairo_clip (cr);
+
   cairo_pattern_t *pattern = cairo_pattern_create_for_surface (surface);
   cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD);
 
@@ -200,6 +209,8 @@
 
   cairo_pattern_destroy (pattern);
   cairo_surface_destroy (surface);
+
+  cairo_restore (cr);
 }
 
 static void